Skip to content

Instantly share code, notes, and snippets.

@MSFTserver
Last active September 4, 2023 07:29
Show Gist options
  • Star 38 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save MSFTserver/6212f85d79058a024b0e49f3d19a1115 to your computer and use it in GitHub Desktop.
Save MSFTserver/6212f85d79058a024b0e49f3d19a1115 to your computer and use it in GitHub Desktop.
How to run disco diffusion V5 on windows 10 with WSL

Install Disco Diffusion v5 for Windows w/ subsystem for linux!

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, i will leave this guide here for those that still want to explore working with linux wich i do still recommend.

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

1. Enable subsystem for linux on windows!

Make sure to run PowerShell as Administrator.

(CHOOSE ONE!)

  • Option A (control panel)
    1. Open control panel and click "Programs" from here select "Turn windows feature on or off"
      • This should have opened a new window with a list of features, scroll all the way to the bottom
    2. Select "Windows Subsystem for Linux"
    3. Also select "Virtual Machine Platform"
    4. Restart your pc after installing
  • Option B (PowerShell)
    1. PowerShell: Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
    2. PowerShell: Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform
    3. Restart your pc after installing




2. Upgrade WSL to version 2

Make sure to run PowerShell as Administrator.

  1. Update Windows 10 to version 21H2
    • This might be listed under the "view optional updates" text/link on the update page
    • check current version
      • PowerShell: winver
      • PowerShell: wsl -l -v
  2. If you do not have wsl version 2 from wsl command
    • Make sure you have "Receive updates for other Microsoft products when you update Windows" checked in Advanced options of the Updates sections
      • If unchecked rerun the windows update process again
    • PowerShell: wsl --update
  3. After updating WSL to version 2 we need to tell it to use version 2 on current distro and future ones
    • PowerShell: wsl --set-default-version 2




3. Download & Prepare linux Distro

  1. Open the microsoft store app and search "Linux", i went with Ubuntu 20.04
  2. Setup username and password for linux distribution
  3. Run the following command to update some things
    • Linux: sudo apt update && sudo apt upgrade -y




4/. Anaconda + Jupyter (included in anaconda)

  1. Download anaconda
    • Linux: wget https://repo.anaconda.com/archive/Anaconda3-2021.11-Linux-x86_64.sh
  2. Install the library
    • Linux: bash Anaconda3-2021.11-Linux-x86_64.sh
  3. Refesh bash for anaconda install
    • Linux: source ~/.bashrc
  4. Start Conda & Install Dependencies
    • Linux: conda config --set channel_priority false
    • conda update --all --yes
    • conda create -n disco_v5 python=3.8.10 --yes
    • conda activate disco_v5
    • conda install -c conda-forge opencv --yes
    • conda install pytorch=1.10.0 torchvision torchaudio cudatoolkit=11.3 -c pytorch -c conda-forge --yes
  5. Install needed pip dependencies
    • Linux: pip install lpips datetime timm pandas matplotlib ftfy
    • Linux: pip install opencv-python ipywidgets omegaconf>=2.0.0
    • Linux: pip install pytorch-lightning>=1.0.8 torch-fidelity einops wandb
    • Linux: pip install --upgrade jupyter_http_over_ws>=0.0.7
  6. Enable the extension for jupyter
    • Linux: jupyter serverextension enable --py jupyter_http_over_ws
  7. Start the jupyter server
    • Linux: jupyter notebook --NotebookApp.allow_origin='https://colab.research.google.com' --port=8888 --NotebookApp.port_retries=0 --no-browser
@Artixart
Copy link

Artixart commented Nov 1, 2022

getting an error, pls help :(
WslRegisterDistribution failed with error: 0x80370102

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment