Install Automatic1111 on Windows

Are you looking to install Stable Diffusion web UI on your Windows machine? Look no further! This guide will walk you through the simple steps to get up and running with the latest web UI version.

Installing on Windows

Step 1: Download the sd.webui.zip File

The first step is to download the sd.webui.zip file from here. Note that this package is for version v1.0.0-pre, and we’ll update it to the latest web UI version in the next steps.

Step 2: Extract the Zip File

Extract the zip file to a location of your choice on your computer.

Step 3: Update Web UI to the Latest Version

Double-click the update.bat file to update the web UI to the latest version. Wait for the process to complete, and then close the window.

Step 4: Launch Web UI

Double-click the run.bat file to launch the web UI. During the first launch, it will download large amounts of files. Once everything has been downloaded and installed correctly, you should see a message “Running on local URL: http://127.0.0.1:7860.” Opening this link in your browser will present you with the web UI interface.

Congratulations! You’re now ready to start generating images.

Extra Configurations via COMMANDLINE_ARGS

If you want to apply some extra configuration options to the web UI, you can do so by editing the launch script found at sd.webui\webui\webui-user.bat. To configure these options, follow these steps:

  1. Edit the file using a text editor.
  2. Add the selected arguments after set COMMANDLINE_ARGS=.

For example:

set COMMANDLINE_ARGS=--autolaunch --update-check

Each individual argument should be separated by a space. In this case, we’re configuring web UI to auto-launch the browser page after it completes loading and also check for new versions of web UI at launch.

Troubleshooting

If you encounter any issues during the installation process, refer to our troubleshooting guide below:

  • For GPU with less amounts of VRAM, use --medvram or --lowvram optimizations to reduce VRAM requirements. These options sacrifice performance but can help the web UI run smoothly.
  • If your generated results in resulting in a black or green image, try adding --precision full and --no-half.
  • Some combinations of model and VAE are prone to produce NansException: A tensor with all NaNs was produced in VAE resulting in a black image. Using the option --no-half-vae may help to mitigate this issue.

Extra Options

There are several cross attention optimization methods such as --xformers or --opt-sdp-attention, these can drastically increase performance. Experiment with different options as different hardware are suited for different optimizations. If you wish to measure your system’s performance, try using the sd-extension-system-info extension which features a benchmarking tool and a database of user submitted results.

  • Add --autolaunch to have web UI launch the web browser automatically after web UI has started up.
  • Add --update-check will notify you when there’s a new version of webui.

Tip

If you already have stable diffusion models downloaded, you can move the models into sd.webui\webui\models\Stable-diffusion\ before running run.bat in step 3. This will skip auto downloading the vanilla stable-diffusion-v1-5 model model.