How to install Stable Diffusion on any Windows PC

Sayem Ahmed
Blue abstract image of a neural network

Want to know how to install Stable Diffusion on your PC? This guide breaks the process into simple-to-follow steps and helps you supercharge your creativity.

Generative AI has been the flavor of the season. Tools like ChatGPT, Google Bard (now Gemini), Adobe Firefly, and others have shown how simple prompts can create content and stunning visuals.

Like Dall-E, Stable Diffusion democratizes text-based image generation and is not resource-hungry. All you need to do is enter a prompt as detailed as possible and let the system weave its magic within minutes.

That said, it’s relatively easy to download Stable Diffusion and install it on your Windows PC if you know where to download it and key in the correct commands. This guide takes you through the entire process and system requirements, including CPU and GPUs.

Install Python

  • Download Python 3.10.6 here or on the Microsoft Store.
  • Run the installer and check “Add Python to PATH”. This will allow Python from the command prompt.
  • Go through the setup process to get the software fully installed with any customizations you require.
  • Once the installation is finished, you will see a screen with the message “Setup was successful”.

Install Git

Git is a piece of software used to manage repositories on your PC, and is widely used for software development. Getting Git installed will assist in the Stable Diffusion installation process.

  • Download Git on Windows here.
  • Follow the instructions on the installer once it is downloaded.

Clone Web-UI

Now, this is where it can get complicated, what we’re going to do is get the basics of the Stable Diffusion installation on your PC.

  • Run “command prompt” on your PC
  • Navigate to “C:\Users\X> – “X” denotes your user name.
    To get there, you can also type “cd %X%” and press enter. This will get you to the right file directory.
  • Paste the following command into the window without quote marks.
    git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
  • After running this command, open your file explorer and navigate to your user folder. If successful, you should have a new folder named “stable-diffusion-webui

Download a Stable Diffusion model file

Next, you will need to get a Stable Diffusion model file, this is usually several gigabytes, and that’s totally normal, it just might take a while to install.

  • Download a Stable Diffusion model file from HuggingFace here.
  • Navigate to the “stable-diffusion-webui” folder we created in the previous step.
  • Locate the “models” folder, and inside that, open “stable-diffusion”. Inside, there will be a text file.
  • Move the previously-downloaded Stable Diffusion model file to this folder.

Set up Web-UI

Finally, you’ll need to set up Web-UI in order to finally run Stable Diffusion. Luckily, this is a relatively simple process.

  • Open the “stable-diffusion-wbui” folder we created in Step 3.
  • Run “webui-user.bat”
  • This will open a command prompt window which will then install all of the necessary tools to run Stable Diffusion, this process can take 5-10 minutes.
  • You will know when the process is completed when you see the URL “http://127.0.0.1:7860” in the command prompt window.

Run Stable Diffusion

With all of that installed, all you now need to do is open your web browser and paste “http://127.0.0.1:7860” into the address bar. This will then run Stable Diffusion in your browser.

How to use Stable Diffusion

Blue background with vague numerical characters

In order to use Stable Diffusion, input a prompt on the WebUI window, which will then generate an image based on that prompt. You’ll need a powerful Nvidia or AMD graphics card in order to create the image. On the UI, you can also adjust things like the size of the image, and how many images you want the software to generate, too.

What is Stable Diffusion?

Stable Diffusion is a piece of software with a trained dataset that can turn text prompts into AI-generated images. The generated images can be of almost anything that you can imagine, though it does require some fine prompt tuning in order to get the output that you want.

Related Topics

About The Author

Dexerto's Hardware Editor. Sayem is an expert in all things Nvidia, AMD, Intel, and PC components. He has 10 years of experience, having written for the likes of Eurogamer, IGN, Trusted Reviews, Kotaku, and many more. Get in touch via email at sayem.ahmed@dexerto.com.