How to Install Stable Diffusion on Windows

Configuring Stable Diffusion on Windows - here's how to do it

Installing stable diffusion on Windows.

You can trust PC GuideOur team of experts use a combination of independent consumer research, in-depth testing where appropriate – which will be flagged as such, and market analysis when recommending products, software and services. Find out how we test here.

Last Updated on

With the artwork of generative AI continuing to get more complex and realistic, eyes are turning to Stable Diffusion as a standout model to try out. Naturally, a question that keeps cropping up is how to install Stable Diffusion on Windows. In this tutorial, we’ll guide you through installing Stable Diffusion, a popular text-to-image AI software, on your Windows computer. With Stable Diffusion, you can create stunning AI-generated images on a consumer-grade PC with a GPU. Once you’ve completed this tutorial, you can generate your AI images right from the comfort of your computer.

System requirements for installing Stable Diffusion?

Your PC must be running Windows 10, or a more recent version, to install Stable Diffusion. You’ll also need 16GB of system memory (RAM) and a discrete graphics card (GPU) with 4GB VRAM at minimum.

You can run Stable Diffusion with an integrated GPU, also known as integrated graphics. To check if your PC has integrated graphics, go to Start Menu > Search for “Device Manager” > Click the arrow next to Display Adapters. Then you can Google the name of your graphics card to check that it has at least 4GB RAM.

If your PC doesn’t meet these requirements, alternatives are still available. One option is a cloud service like Google Colab, while another is a Mac with an Apple Silicon M1 or M2 chip.

How to install Stable Diffusion

Step

1

Install Python

The first step in installing Stable Diffusion is to get Python up and running on your computer.

  • To use Stable Diffusion, you’ll need to have Python 3.10.6 installed on your device. You can download the 64-bit Windows installer by visiting the official Python website or by using the direct download link provided.
  • Once you’ve downloaded the installer, open it up to begin the installation process. Be sure to check the box that says, “Add Python 3.10 to PATH”, as this will ensure that Python is added to your system’s PATH environment variable.
  • After checking this box, click “Install Now” to start the installation process.
  • If you encounter any errors during the installation process, it’s likely because you already have an older version of Python installed on your system.

In this case, you’ll need to remove any previous versions of Python before re-installing version 3.10.6. You can do this by visiting the Control Panel and selecting “Add or remove programs.

How to install Python - Download the "Recommended" option for Windows 10.
How to install Python – Download the “Recommended” option for Windows 10.

Step

2

 Installing Git

To install and update AUTOMATIC1111, you’ll need to have Git installed on your computer. Git is a code repository management system that is widely used in the software development industry.

  • To get started, head over to the official Git website and download the Windows version of the software.
  • After downloading the Git installer, open it up and click “Install” to accept the license agreement and start the installation process.
  • Follow the instructions provided by the installer to complete the installation of Git on your system.

With Git installed, you can easily manage and update AUTOMATIC1111 as needed.

Step

3

Cloning Web-UI

This step can be challenging, but you can do it easily with a little guidance.

  • Start by pressing the Windows key on your keyboard (it should be located to the left of the space bar). This will bring up a search window on your screen.
  • Type “cmd” into the search bar and then click the Command Prompt option when it appears.

This will open up a command prompt window on your screen. Once the window is open, the next step is to navigate to your home folder. 

  • To complete this, type “cd %userprofile%” into the command prompt and press Enter. This command will ensure that you’re in the right folder before you move on to the next step. (Pro tip: You can right-click to paste in Command Prompt.)
  • If you’ve entered the command correctly, your prompt should show something like “C:\Users\YOUR_USER_NAME>.
  • Now that you’re in the correct folder, it’s time to clone the AUTOMATIC1111 repository.
  • To accomplish this, type the following command into the command prompt window and then press Enter: “git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git

After entering this command, a new folder named “stable-diffusion-webui” must be in the home directory. This folder contains all the files you’ll need to run AUTOMATIC1111 on your computer.

Step

4

Downloading Model File

  • Begin by accessing the recently established directory using File Explorer.
  • Enter the following command in the address bar: %userprofile%\stable-diffusion-webui
  • Afterward, press the “enter” key to proceed.
  • Once in the designated folder, locate the “models” subfolder and navigate to “Stable-diffusion.”
  • Inside this directory, you’ll notice a .txt file named “Put Stable Diffusion checkpoints here.

Your next step involves downloading v1.5 of the Stable Diffusion checkpoint file.

  • You can obtain it using the following download link on the HuggingFace website.
  • Once the file has finished downloading, transfer it to the folder mentioned previously.

Step

5

Running Web-UI

  • Using File Explorer, navigate back to the folder named “stable-diffusion-webui.”
  • You can do that by returning two levels, or you can do it by directly inputting the command %userprofile%\stable-diffusion-webui in the address bar once more.
  • Look for a file named webui-user.bat and double-click it to begin the installation.
  • This final step may take some time to complete.
  • Once finished, a message indicates that the program runs on the local URL: http://127.0.0.1:7860.

Now, open your preferred web browser and go to the URL http://127.0.0.1:7860/.

  • You should see the AUTOMATIC1111 webui!
  • Try inputting a prompt (such as “a cat”) and click “Generate” to test if Stable Diffusion is operating correctly.

When you are done using the tool, close the cmd window to shut the program down. If you wish to use it again later, double-click the webui-user.bat file.

Conclusion

Now, you will be running the Stable Diffusion on your PC. Just go through these steps again if you have to deal with any issues running your program, and it will work just fine again. To get you started using your newly downloaded software, you could consider reading our detailed guide on how to use Stable Diffusion, or how to write Stable Diffusion prompts in order to start your creative journey.

Kevin is the Editor of PC Guide. He has a broad interest and enthusiasm for consumer electronics, PCs and all things consumer tech - and more than 15 years experience in tech journalism.