AUTOMATIC1111's Stable Diffusion WebUI is the most popular and feature-rich way to run Stable Diffusion on your own computer.
It has the largest community of any Stable Diffusion front-end, with almost 100k stars on its Github repo.
At the end of this guide we'll run through an example that produces this image with the Stable Diffusion V1.5 model that comes with the installation by default:
If your setup is working properly you'll be able to recreate this image exactly.
This guide is for NVIDIA GPUs. Here's the guide for AMD GPUs, for which there is no official support.
You need to meet the following requirements.
- 16GB RAM
- NVIDIA (GTX 7xx or newer) GPU with at least 2GB VRAM
- Linux or Windows 7/8/10/11+
- At least 10GB disk space
This method will only work on Windows 10/11. For older versions of Windows, scroll down to the alternate method.
Step 1: Download
sd.webui.zip extract the zip file.
Step 2: Update
Open the extracted folder. Double click
update.bat to update web UI to the latest version (if you get a security warning click the "Run Anyway" button). Close the windows when finished.
Step 3: Install
Double click the
run.bat script to launch web UI, during the first launch.
The first time you launch this it will take a while to download all the necessary packages. This step will also download the Stable Diffusion v5.1 model.
After everything has been downloaded and installed correctly, you should see a message "
Running on local URL: http://127.0.0.1:7860".
Open your browser and go to the address in this success. For me it is
http://127.0.0.1:7860 (yours may be different).
Skip to the next section if your installation is working.
Step 1: Install Git
Go to the official Git website to download Git.
Get the Standalone Installer. Choose the appropriate Git installer for your Windows operating system.
Open the .exe you just downloaded. Click Next to accept the license.
The default options are completely fine. Click Next.
You will be given many screens of options. The defaults are all fine. Click Next for all of them. Git will install.
Step 2: Install Python
Install Python from the official site. You want the latest version of 3.10. Make sure you choose the right version, 32-bit or 64-bit.
Important: In the installation wizard, make sure you check "
Add python.exe to PATH".
Step 3: Download Web UI
Press the Window keyboard key or click on the Windows icon (Start icon). Search for "
Command Prompt" and click on the Command Prompt App when it appears.
You should see a line like this:
Use this command to move into folder:
Use this command to go back up a folder:
Use this command to list all folders within the folder you are in:
As an example, I will install Stable Diffusion in my
Documents folder. I would type this command:
When you are in the folder you want to install Stable Diffusion in, copy and paste the following command:
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
Give the Web UI some time to download:
After your download is complete, you'll be able to see your new
stable-diffusion-webui in the Windows Explorer:
Now to configure your VRAM settings. You may encounter "out of memory" errors if you do not do this correctly.
Check how much VRAM you have by typing "dxdiag" in the searchbar and clicking dxdiag, which is the DirectX Diagnostic Tool. Your VRAM will be listed under Display Memory in the Display (or Display 2) tab:
If you have >4GB of VRAM you do not need any additional options and can skip this part.
Open the stable-diffusion-webui folder you just downloaded. Find the file named
webui-user.bat (Windows Batch File) and right click -> Edit (Windows 11: Right click -> Show more options -> Edit).
Add the command you need after the
set COMMANDLINE_ARGS= line. For example:
That's all you have to do for the WebUI!
Run the WebUI
stable-diffusion-webui folder there is a file called ‘
webui-user.bat’. Double click this:
It will take several minutes for the Web UI to install the required modules. This step will also download the Stable Diffusion v5.1 model.
When it is finished you will see the line:
Running on local URL: http://127.0.0.1:7860.
Common issues at this step:
RuntimeError: Couldn't install torch.
Fix: Make you you have Python 3.10.x installed. Type
python --version in your Command Prompt. If you have an older version of Python, you will need to uninstall it and re-install it from the Python website.
Fix #2: Your Python version is correct but you still get the same error? Delete the
venv directory in
stable-diffusion-webui and re-run
Everything else works but I can't go to the address
- Make sure you have not typed "
https://" by accident, the address always starts with "
- In this example my port address is
- Your port address may be different. Please read the success message in your Command Prompt carefully for the correct address.
Testing Your First Prompt
Here's what your interface will look like:
You’ll notice at the top there’s a toggle called “Stable Diffusion Checkpoint”.
You can use this to switch to any of the models you have placed in the
For our example, we'll use Stable Diffusion v1.5. The filename is
Enter the prompt:
portrait of beautiful girl, brown hair, freckles, tshirt, professional lighting, indoor, artistic photography
Now enter the negative prompt:
lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts,signature, watermark, username, blurry, artist name
Set the height slider to 768 and keep the width at 512 to create a nicer aspect ratio more suitable for portraits.
3463 to make sure you'll get the same result.
Generate! Here’s what I get:
Keep in mind I am using the default sampler
Euler a. You can play with these samplers to get an idea of what they do.
You can check out these basic prompts for where to get next:
I also highly recommend experimenting with popular models:
From here, the sky is the limit!
I recommend going through the rest of the Stable Diffusion for Beginners series: