Fast and Easy Way to Use Stable Diffusion on Windows (NVIDIA and AMD)

Use AUTOMATIC1111’s stable diffusion web UI to make free AI art on your own computer.

Fanis Spyrou
4 min readMar 4, 2023
The AUTOMATIC1111 webUI and logos of Windows, AMD and NVIDIA
Image by Author

As you probably know, there are countless websites on the internet you can use to generate AI art. Lexica, dreamlike.art, Playground AI, InstantArt, or some Huggingface space are some of the few I have used in the past.

The problem is that most of them are slow and only offer basic services. They have a limited number of models and features.

By using your computer, you can have maximum control in a simple way.

AUTOMATIC1111’s Stable Diffusion web UI is a useful browser interface that almost everyone uses if they want to run stable diffusion locally.

I will show you how to install it step-by-step.

Another option is to use Google Colab, which is a little more difficult to set up. I plan to explore this option in an upcoming story.

If you see anything out of date, or if you encounter any problems or errors, please let me know in the comments!

Let’s get started.

Technical Requirements

First and foremost, if your computer lacks a GPU (aka graphics card), you are out of luck. The models used to generate AI art need to run on a GPU.

It is important that it has a lot of VRAM. GPUs with a VRAM size lower than 8 GB are going to struggle a lot to generate high-resolution images. You may have to deal with different kinds of errors, too.

In one of my next stories, I plan to write about some of the errors and how you can solve them.

Of course, the more expensive and newer the GPU, the faster your art is going to be generated.

You are even more in luck if you have an NVIDIA GPU. They are more capable of handling AI tasks than their competition, AMD.

Steps to install and run Stable Diffusion web UI

Step 1: Install prerequisites

Download and install Python 3.10.6 and Git, and make sure to check “Add Python to PATH” during the Python installation process.

Step 2: Install AUTOMATIC1111’s web UI

Think of a folder on your computer where you want to place the files. I chose my user’s home directory (C:\Users\<username>).

Open a PowerShell window at the location you chose.

I personally use “shift + right click” somewhere in the folder and then click “Open PowerShell window here”. Or you can click on “File” in the top-left corner and click “Open Windows PowerShell”.

Copy the line below, paste it in the command line and hit “enter” to automatically get the files from GitHub.

  • For NVIDIA GPU:
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
  • For AMD GPU:
git clone https://github.com/lshqqytiger/stable-diffusion-webui-directml.git

Complete the steps below only if you have an AMD GPU:

  • Navigate to the “repositories” folder by typing “cd repositories” in the command line. Or you can open a PowerShell window in the “repositories” folder.
  • Copy the first line below and paste it in the command line. After the download is finished, do the same for the second line.
git clone https://github.com/lshqqytiger/k-diffusion-directml/tree/master

git clone https://github.com/lshqqytiger/stablediffusion-directml/tree/main
  • Rename “k-diffusion-directml” to “k-diffusion” and “stablediffusion-directml” to “stable-diffusion-stability-ai”.

Step 3: Download stable diffusion models

Download one or more Stable Diffusion model checkpoints (“.ckpt” extension) and place them in the “models/Stable-diffusion” directory. The available checkpoints are:

I suggest starting with v1–5 as it has more guides and you can currently do more things with it. For example, you can use the almighty “controlnet”.

Use v2–1_768 only if you have more than 8GB of VRAM.

Also, you need to download the appropriate config file (“.yaml” extension) and store it in the same folder as your model with the same name:

Copy and paste the text in the link in a new text document and replace “. text” extension with “.yaml”. Don’t forget to use the same name as the model it goes with, for example “v1–5-pruned-emaonly.yaml”.

Step 4: Start the web UI

Run “webui-user.bat”.

Wait for any dependencies to be installed and the weights of the model to be loaded.

Once the weights of the model are loaded, you should be able to open the webUI in a browser by copying the URL that is written in the command line.

Wrap up

That’s it. You can go on and generate your first AI art on your own computer for free.

If you have a good GPU, then you should face no problems or errors after the last step.

However, don’t hesitate to comment if you encounter any problems or errors. Chances are, I have already come across it and will be able to help you.

That being said, if you feel incredibly baffled about what to do, you found my guide lacking, or you found any mistake, please mention it in the comments and I’ll look at fixing it.

I hope the above has been helpful for you.

Good luck with your art generation and thanks for reading!

If you encounter any problems after installation, check out the article I wrote about stable diffusion errors here.

Follow me to stay in touch. And thanks for the support.

--

--

Fanis Spyrou

I write about my interests and show you my way of solving problems.