Last active
June 25, 2023 02:13
-
-
Save MSFTserver/a05f637f32302918dd893318a4d9f62b to your computer and use it in GitHub Desktop.
Revisions
-
MSFTserver revised this gist
May 7, 2022 . 1 changed file with 17 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -74,7 +74,23 @@ System Requirements: <ul> <li>used to download models for projects</li> <li>Windows users need this verison</li> <ul><li><a href="https://eternallybored.org/misc/wget/">https://eternallybored.org/misc/wget/</a></li> <details> <summary>(spoiler) Add to Path on Windows (spoiler)</summary> <li>download the .exe</li> <li>create a new folder to put the .exe in (prefereable on the root of your C:/ drive)</li> <ul><li>e.g <code>C:/wget/wget.exe</code></li></ul> <li>open Control Panel and search for <code>environment variables</code></li> <li>select the one with the shield icon <code>Edit the system environment variables</code></li> <li>click the button at the bottom <code>Environment Virables...</code></li> <li>under <code>System variables</code> find the and select the <code>path</code> variable</li> <li>click <code>Edit...</code> button and then <code>New</code></li> <ul><li>add the new path to folder the .exe is in</li> <li>e.g <code>C:/wget</code></ul> <li>once entered click <code>Ok</code> on each window until all 3 are closed<li> <li>for the new env variables to be used you must reopen a new Command Prompt window</li> </ul> </details> <li>Linux users can just use the package in their distributions</li> </ul> </li> -
MSFTserver revised this gist
Apr 29, 2022 . No changes.There are no files selected for viewing
-
MSFTserver revised this gist
Apr 29, 2022 . 1 changed file with 87 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -118,20 +118,102 @@ System Requirements: </li> </ol> <ol type="N" start="2"> <li>D) Download disco diffusion repo! <ul> <li><code>git clone https://github.com/alembics/disco-diffusion.git</code></li> <li>change directories into the downloaded repo</li> <ul><li><code>cd disco-diffusion</code></li></ul> </ul> </li> </ol> ## 3) Run Disco Diffusion there are several ways to run disco diffusion at this point: #### 1. [PYTHON .py] plain python file wich means you will need to go into the file and manually find all the configuration options and change them as needed, an easy way to go about this is searching the document for `#@param` lines and edit ones containing that comment trailing the lines e.g. `use_secondary_model = True #@param {type: 'boolean'}`. <ul> <li>Run disco diffusion <ul> <li><code>python -m disco.py</code></li> </ul> </li> </ul> #### 2-3. [VS .py/.ipynb] running the .ipynb file directly in VS also requires editing of the <code>#@param</code> lines in the code <ul> <li>Download Visual Studio <ul> <li><a href="https://code.visualstudio.com/download">https://code.visualstudio.com/download</a></li> </ul> </li> <li> Open the .ipynb file in VS <ul> <li>ENJOY!</li> <li>for more interactivity see the tutorial using jupyter extension</li> </ul> </li> </ul> #### 4-5. [VS + Jupyter extension .py/.ipynb] using the jupyter extension in VS we can get individual cell support to run the either the .ipynb or the .py file also requires editing of the <code>#@param</code> lines in the code <ul> <li>Download Visual Studio <ul> <li><a href="https://code.visualstudio.com/download">https://code.visualstudio.com/download</a></li> </ul> </li> <li> Get the Jupyter Notebook extensions <ul> <li>head over the to the extensions tab in VS code</li> <li>search for <code>jupyter</code> and install the one from Microsoft</li> <li>after this is enabled the notebook should have several new toolbars and features</li> <ul><li>you can actually run both the .py file or .ipynb file which both support individual cells</li></ul> <li>ENJOY!</li> </ul> </li> </ul> #### 6. [Jupyter .ipynb] using Jupyter notebooks to run the .ipynb file also requires editing of the <code>#@param</code> lines in the code <ul> <li> with anaconda installed you should already have jupyter notebook installed if you dont simple run:<br> <code>pip install jupyterlab</code></li> <li> Run Jupyter <ul> <li><code>jupyter notebook</code></li> <ul><li>this launches the juptyer notebook in the current directory and open a webpage</li></ul> <li>under the <code>Files</code> tab double click and open the file named <code>Disco-Diffusion.ipynb</code></li> <li>ENJOY!</li> </ul> </li> </ul> #### 7. [Colab w/ Jupyter using colab links] using Google Colab as a front end to get the nice view of all the editable fields while using Jupyter as middleware to connect your local resources <ul> <li> with anaconda installed you should already have jupyter notebook installed if you dont simple run:<br> <code>pip install jupyterlab</code></li> <li>Connect to colab front end <ul> <li><code>pip install --upgrade jupyter_http_over_ws>=0.0.7</code></li> <li>Enable the extension for jupyter</li> <ul><li><code>jupyter serverextension enable --py jupyter_http_over_ws</code></li></ul> <li>Start the jupyter server</li> <ul><li><code>jupyter notebook --NotebookApp.allow_origin='https://colab.research.google.com' --port=8888 --NotebookApp.port_retries=0 --no-browser</code></li></ul> <li>Inside google colab click the down Arrow icon next to the Connect button to view more options</li> <li>Select connect to Local Runtime and enter the Local Host Url that was printed in the console when we started jupyter server</li> <li>ENJOY!</li> </ul> </li> </ul> -
MSFTserver revised this gist
Apr 28, 2022 . 1 changed file with 5 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,10 +11,11 @@ You may now use the official disco diffusion notebook with this tutorial as it h This will walk you through getting your environment setup to run most of the GANs with Anaconda as a Virtual Python Environment. System Requirements: ``` OS: Windows (11/10/8/7), Ubuntu(19,20) GPU: Nvidia (AMD hasnt been tested) VRAM: 12gb+ ``` ## 1) Download Tools! <ol type="N"> -
MSFTserver renamed this gist
Apr 28, 2022 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
MSFTserver created this gist
Apr 28, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,136 @@ ## Install Disco Diffusion v5 for Windows NOTE: Pytorch3d no longer has to be compiled i have stripped out the function we use to make this a lot easier and also so we do not have to use WSL2 with linux and can now run directly on your windows system. Comments section is not checked often for issues please join the disco diffusion discord for assistance https://discord.gg/mK4AneuycS You may now use the official disco diffusion notebook with this tutorial as it has been uodated to reflect the changes here for better cross platform support This will walk you through getting your environment setup to run most of the GANs with Anaconda as a Virtual Python Environment. System Requirements: OS: Windows (11/10/8/7), Ubuntu(19,20) GPU: Nvidia (AMD hasnt been tested) VRAM: 12gb+ ## 1) Download Tools! <ol type="N"> <li>A) Cuda enabled GPU <ul> <li>Latest Nvidia Drivers</li> <ul><li><a href="https://www.nvidia.com/Download/index.aspx">https://www.nvidia.com/Download/index.aspx</a></li></ul> <li>CUDA Toolkit for your version</li> <ul><li><a href="https://developer.nvidia.com/cuda-downloads">https://developer.nvidia.com/cuda-downloads</a></li> <li><a href="https://docs.nvidia.com/cuda/cuda-quick-start-guide">https://docs.nvidia.com/cuda/cuda-quick-start-guide</a></li></ul> </ul> </li> </ol> <ol type="N"> <li>B) Python (Anaconda) <ul> <li><a href="https://www.anaconda.com/products/individual#Downloads">https://www.anaconda.com/products/individual#Downloads</a></li> <li>We use anaconda to make it easier to manage different projects</li> <li>Virtual python evironment and versioning</li> <li>Anaconda also includes Jupyter Notebook pre-installed</li> </ul> </li> </ol> <ol type="N"> <li>C) Git <ul> <li><a href="https://git-scm.com/downloads">https://git-scm.com/downloads</a></li> <li>version control manager for code</li> <li>we just use it to download repos from GitHub</li> <li>Must be on system PATH, When installing select the option add to system PATH</li> </ul> </li> </ol> <ol type="N"> <li>D) FFmpeg <ul> <li><a href="https://ffmpeg.org/download.html">https://ffmpeg.org/download.html</a></li> <li>Video encoding tool library</li> <li>we use this mainly to turn image sequences into videos</li> <li>Must be on system PATH</li> <ul><li><a href="https://www.wikihow.com/Install-FFmpeg-on-Windows">https://www.wikihow.com/Install-FFmpeg-on-Windows</a></li></ul> </ul> </li> </ol> <ol type="N"> <li>E) ImageMagick <ul> <li><a href="https://imagemagick.org/script/download.php">https://imagemagick.org/script/download.php</a></li> <li>software suite for displaying, creating, converting, modifying, and editing raster images.</li> <li>used in some projects but handy to have already installed</li> </ul> </li> </ol> <ol type="N"> <li>F) Wget <ul> <li>used to download models for projects</li> <li>Windows users need this verison</li> <ul><li><a href="https://eternallybored.org/misc/wget/">https://eternallybored.org/misc/wget/</a></li></ul> <li>Linux users can just use the package in their distributions</li> </ul> </li> </ol> <ol type="N"> <li>G) cURL <ul> <li>used to download models, some projects use this instead of wget</li> <li>Latest versions of windows have cURL pre installed</li> <li>Older versions that dont include cURL use this one</li> <ul><li><a href="https://curl.se/windows/">https://curl.se/windows/</a></li></ul> <li>Linux users can just use the package in their distributions</li> </ul> </li> </ol> ## 2) Install Disco Dependencies <ol type="N" start="2"> <li>A) Setup and activate conda env <ul> <li><code>conda create --name disco-diffusion python=3.9</code></li> <li><code>conda activate disco-diffusion</code></li> </ul> </li> </ol> <ol type="N" start="2"> <li>B) Install a few more pip dependencies <ul> <li><code>pip install ipykernel opencv-python pandas regex matplotlib ipywidgets</code></li> </ul> </li> </ol> <ol type="N" start="2"> <li>C) Install Pytorch with CUDA support! <ul> <li><a href="https://pytorch.org/get-started/locally/">https://pytorch.org/get-started/locally/</a></li> <li>be sure to install a version with GPU support!</li> <li>example of what worked for me </li> <ul><li><code>conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch</code></li></ul> </ul> </li> </ol> <ol type="N" start="2"> <li>D) Run disco diffusion <ul> <li><code>python -m disco.py</code></li> </ul> </li> </ol> <ol type="N" start="2"> <li>E) optionally connect to colab front end <ul> <li><code>pip install --upgrade jupyter_http_over_ws>=0.0.7</code></li> <li>Enable the extension for jupyter</li> <ul><li><code>jupyter serverextension enable --py jupyter_http_over_ws</code></li></ul> <li>Start the jupyter server</li> <ul><li><code>jupyter notebook --NotebookApp.allow_origin='https://colab.research.google.com' --port=8888 --NotebookApp.port_retries=0 --no-browser</code></li></ul> </ul> </li> </ol>