Advertisement
ArgieAnon

How To Install AI Dungeon 2 Locally On Windows

Dec 11th, 2019
5,993
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.84 KB | None | 0 0
  1. How To Install AI Dungeon 2 Locally On Windows:
  2.  
  3. READ THIS FIRST!
  4. This offline version contains only the original AI Dungeon 2 base game, with only being uncensored by default as an addon.
  5. There are 2 ways of installing this (both using the same torrent), the first one bellow is simpler and comes with batch files that automates most things. The second one is the manual version where you will have to do everything yourself, it's at the end of the pastebin. Both versions are the same, it just changes how you install them.
  6. Bellow that, there is information on how to easily update the game with whatever GitHub fork you desire, beware that there is a modded version that requires extra steps to get it going so read the instructions for it BEFORE doing anything else if you intend on using it.
  7. Also, near the end of the pastebin there is a supposed fix that improves performance of the game, try it if you want but it is not necessary.
  8.  
  9. Requirements: either 16+ GB of RAM to run this on your CPU or have a CUDA enabled GPU with more than 12GB of VRAM (lower specs will run the game slower, you have been warned).
  10.  
  11. =======================================================================================================================================
  12.  
  13. Automatic install:
  14. 1) Download the windows version of the game from this torrent (don't be a leecher and keep seeding): magnet:?xt=urn:btih:dcff0d93ab2b1cad2823360e31d3668b93a81510&dn=AIDun2EASY.zip
  15. This contains batch files and the correct python installer included for dead-simple installing.
  16. 2) JUST FOLLOW THE INCLUDED INSTRUCTIONS.
  17. 3) CHECK THE BOX THAT SAYS "Add Python 3.7 to PATH" IN THE PYTHON INSTALLER.
  18. 4) DON'T TOUCH THE PIP INSTALLS UNTIL IT SAYS "Press any key to continue...".
  19. 5) "RunAIDungeon.bat", is like a shortcut to launch the game after it's installed.
  20.  
  21. =======================================================================================================================================
  22.  
  23. Updating the local version:
  24. It is possible to update your local version by simply downloading the ".zip" of whatever GitHub fork you want to use. Then, simply take those files and overwrite with them in the root folder of your local version (to revert to the base/original version, I advise to make a copy elsewhere of every folder the ".zip" changes, then you only need to delete the updated folders and copy back the original ones to restore the base game).
  25. Beware that, if upon updating it gives you an error when trying to play, you can try editing the "AUTO INSTALL FOR BRAINDEAD COOMERS" batch so that it also installs whatever thing you are lacking, and run it (if you manually installed, the process is similar, you just need to type the commands in cmd).
  26. The are 2 GitHub forks currently in use: https://github.com/thadunge2/AIDungeon and https://github.com/cloveranon/Clover-Edition
  27. Current fix:
  28. !pip install regex
  29. !pip install profanityfilter
  30. !pip install playsound
  31. !pip install func_timeout
  32. !pip install tracery
  33. !pip install pyjarowinkler
  34. !pip install transformers
  35. !pip install torch
  36.  
  37. About Clover Edition:
  38. Requirements: either 8+ GB of RAM to run this on your CPU or have a CUDA enabled GPU with more than 6GB of VRAM (lower specs will run the game slower, you have been warned).
  39. Clover Edition recently started to use PyTorch, that's the main reason why the game requirements are so much lower. The installation process is a bit more complicated than what was depicted above, but is still doable.
  40. To see more info on how to do it, visit >https://github.com/cloveranon/Clover-Edition and follow the instructions.
  41.  
  42. =======================================================================================================================================
  43.  
  44. Quick troubleshooting:
  45.  
  46. > pip not recognized
  47. (X) Python wasn't added to PATH. Rerun the python installer, select modify, enable pip, hit next, enable "Add Python to environment variables," and hit install.
  48.  
  49. > ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none)
  50. (X) You either have Python 32-bit or version v3.8. Uninstall and get the right download.
  51.  
  52. > If you have problems installing python on Windows 10:
  53. (X) Windows 10 makes a stupid fucking alias to help you install python, but if you already installed it. It doesn't recognize it.
  54. Basically running python from command prompt will open windows store if you didn't install it from windows store. To solve it just go into "manage app execution aliases" and disable python in there, you may need to restart your computer.
  55.  
  56. > How fast does the Local offline version run on only the CPU?
  57. (X) Local response time depends on number of CPU cores, amount of RAM, Bus size on CPUs, Mobo/Bus speeds, and Tensorflow's version. You can try to downgrade to Tensorflow 1.14 or 1.13 to speed up the AI.
  58.  
  59. > If, for whatever reason, you are using a censored version just do:
  60. (X) Replace "return pf.censor(text)" with "return text" in story/utils.py line 71
  61.  
  62. > Is there a way to tell the AI Dungeon to use my CPU over GPU and vice versa?
  63. (X) It will switch to CPU if it sees your GPU is up to no good (or at least if you miss some CUDA stuff). You can also install tensorflow 1.14, which is a CPU only version so it won't even try. Newer versions than 1.14 are for both CPU and GPU, it will probably try running it through GPU first but should switch to cpu after throwing some errors on startup.
  64. Or you can try this in cmd: pip uninstall tensorflow-gpu
  65.  
  66. > How can I use a background image in cmd like I see people using?
  67. (X) Windows and Linux shells lets you use background images for your terminal (only if using Powershell). End result should look something like this: >https://i.ibb.co/RD7ZShf/1576562191889.jpg
  68.  
  69. > How do I stop AI Dungeon from allocating 125MB of VRAM on every GPU it finds? I don't want to make the other people using this server suspicious.
  70. (X) This is a bug with Tensorflow 1. There's supposedly a "max_devices" GPU option you can set to make it only run on 1 GPU.
  71. Add these lines at the top of play.py (put this after "import os", obviously):
  72.  
  73. import argparse
  74. parser = argparse.ArgumentParser()
  75. parser.add_argument('--gpus', nargs="+", default=["0"])
  76. args = parser.parse_args()
  77. visible_devices = ",".join(args.gpus)
  78. os.environ["CUDA_VISIBLE_DEVICES"] = visible_devices
  79. print("running on gpus", visible_devices)
  80.  
  81. (X) Then you can run play.py --gpus <gpu1> <gpu2>... to explicitly tell it which GPUs to run on. Or you can leave out the argument and it will just run on GPU 0.
  82.  
  83. =======================================================================================================================================
  84.  
  85. Performance Fix:
  86. If your CPU was made in the last decade it probably supports AVX2. If you run tensorflow with AVX2 support, you will have potentially slightly faster calculations. This tensorflow build has those CPU optimizations, try it if you want but it is not necessary.
  87. 1) Download this guy's pre-compiled tensorflow: https://github.com/fo40225/tensorflow-windows-wheel/tree/master/1.14.0/py37/CPU/avx2
  88. (you just do pip install "name of the whl" from the folder where it's saved, don't fucking change the name or it will break) (or, go to the folder where you downloaded the file and type cmd in the path thingy). Then:
  89. 2) pip uninstall tensorflow
  90. 3) pip uninstall tensorboard
  91. 4) pip uninstall tensorflow_estimator
  92. 5) pip install tensorflow-1.14.0-cp37-cp37m-win_amd64.whl
  93.  
  94. =======================================================================================================================================
  95.  
  96. Manual install:
  97. 1) Install Python 3.7.5, 64-bit. Make sure you enable adding python to PATH when installing. If you plan to use the GPU, also install CUDA toolkit (latest release should be fine) and cuDNN (make sure this version matches your CUDA Toolkit version)
  98. 2) Download the windows version of the game from this torrent (in this instance, only use the "AIDungeon" folder, ignore the rest) (don't be a leecher and keep seeding): magnet:?xt=urn:btih:dcff0d93ab2b1cad2823360e31d3668b93a81510
  99. 3) Open a command prompt in whatever folder you extracted the game into (just type "cmd" into the folder's url and hit enter).
  100. 4) Run the command "pip install tensorflow" for the CPU version or "pip install tensorflow-gpu" for the GPU version. If you have tensorflow issues later on, try "pip install tensorflow==1.14".
  101. 5) Run the command "pip install pyyaml"
  102. 6) Run the command "pip install -r requirements.txt"
  103. 7) Run the command "python play.py" and it should start the game
  104.  
  105. To run the game easily after a manual install, try this:
  106. 1) Make ".txt" file in the main folder.
  107. 2) Type the command you use to run the game into the ".txt" file (python play.py) and save it.
  108. 3) Rename the file from "whatever.txt" to "whatever.bat".
  109. And done, you have a working program that will automatically open "cmd" and run that command for you, starting the game in one easy click.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement