Running Disco Diffusion on a Windows instance

Disco Diffusion (aka DD) is a clip-guided diffusion model that can generate amazing images from text prompt

Disco Diffusion can be found at

Step 1: Deploy your Cloud GPU

You can deploy a GPU on our Marketplace to your specific configurations based on cost, RAM, storage, and vCPUs.

Disco Diffusion works on NVIDIA GPUs with at least 12 GB of dedicated VRAM on a Windows OS, so make sure your Cloud GPU adheres to these settings. You will also need at least 80 GB in your Disk to run Windows.

Step 2: RDP into your instance

Follow this tutorial to RDP into your Cloud GPU

Step 3: Install required tools

In your Remote Desktop, download all of the following:

  1. Python (Anaconda)

  2. Git

    • version control manager for code

    • we just use it to download repos from GitHub

    • When installing select the option add to system PATH

  3. FFmpeg

  4. ImageMagick

  5. Wget

    • used to download models for projects

    • Windows users need this verison


        • download the .exe

        • create a new folder to put the .exe in (prefereable on the root of your C:/ drive)

          • e.g C:/wget/wget.exe

        • open Control Panel and search for environment variables

        • select the one with the shield icon Edit the system environment variables

        • click the button at the bottom Environment Virables...

        • under System variables find the and select the path variable

        • click Edit... button and then New

          • add the new path to folder the .exe is in

          • e.g C:/wget

        • once entered click Ok on each window until all 3 are closed

        • for the new env variables to be used you must reopen a new Command Prompt window

  6. cURL

    • used to download models, some projects use this instead of wget

    • Latest versions of windows have cURL pre installed

    • Older versions that dont include cURL use this one

    • Linux users can just use the package in their distributions

Step 4: Install dependencies

Run the following in powershell on your remote desktop:

  1. Setup and activate conda env

  • conda create --name disco-diffusion python=3.9

  • conda activate disco-diffusion

  1. Install a few more pip dependencies

    • pip install ipykernel opencv-python pandas regex matplotlib ipywidgets

  2. Install Pytorch with CUDA support!

  3. Download disco diffusion repo

    • git clone

    • change directories into the downloaded repo

      • cd disco-diffusion

Step 5: Run Disco Diffusion

You can now use any of the following methods to run disco diffusion:

  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'}.

  • Run disco diffusion

    • python -m

  1. [VS .py/.ipynb]

running the .ipynb file directly in VS also requires editing of the #@param lines in the code

  1. [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 #@param lines in the code

  • Get the Jupyter Notebook extensions

    • head over to the extensions tab in VS code

    • search for jupyter and install the one from Microsoft

    • after this is enabled the notebook should have several new toolbars and features

      • you can actually run both the .py file or .ipynb file which both support individual cells

    • ENJOY!

  1. [Jupyter .ipynb]

using Jupyter notebooks to run the .ipynb file also requires editing of the #@param lines in the code

  • with anaconda installed you should already have jupyter notebook installed if you dont simple run: pip install jupyterlab

  • Run Jupyter

    • jupyter notebook

      • this launches the juptyer notebook in the current directory and open a webpage

    • under the Files tab double click and open the file named Disco-Diffusion.ipynb

    • ENJOY!

  1. [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

  • with anaconda installed you should already have jupyter notebook installed if you dont simple run: pip install jupyterlab

  • Connect to colab front end

    • pip install --upgrade jupyter_http_over_ws>=0.0.7

    • Enable the extension for jupyter

      • jupyter serverextension enable --py jupyter_http_over_ws

    • Start the jupyter server

      • jupyter notebook --NotebookApp.allow_origin='' --port=8888 --NotebookApp.port_retries=0 --no-browser

    • Inside google colab click the down Arrow icon next to the Connect button to view more options

    • Select connect to Local Runtime and enter the Local Host Url that was printed in the console when we started jupyter server

    • ENJOY!

You can now use Disco Diffusion on your Tensordock instance. For examples of how to use, follow any of these tutorials:

Last updated