How to Install Stable Diffusion Automatic1111

Introduction

Hello there and welcome!

In this video, I’m going to walk you through the installation of the most popular Stable Diffusion web UI, Automatic1111. This is my recommended full install method, that installs all the necessary files on your system and gives you the greatest flexibility going forward. I’ve also included some tips and additional tweaks to increase image generation speed and update Automatic1111 automatically.

This method does, however, involve a couple of technical bits, which I’ll walk you through step-by-step, and are actually pretty simple and straight forward. However, if you really are looking for a non-technical 1 click install method, then you may want to take a look at my other video that I did for that. I’ll leave a link for it in the description.

I’ll be installing Automatic1111 locally on my PC running a NVIDIA GPU.

I’ll leave all the links and references that I cover in this tutorial, in the Reources section at the end.

So, let’s crack on.

Install Python

The first step is to download and install Python. However, it’s important that you install only version 3.10.6 of Python and not any other version, otherwise you’ll run into errors when you try to launch Automatic1111.

Open the Python 3.10.6 page. Scroll down to the section titled “Files”. Here you’ll see a list of different files that you can download. I’m running a 64-bit version of Windows 11, so I’ll click on the “Windows installer (64-bit)” file download link. Navigate to the location where you want to save the file to. I’ll select my E drive, and then click Save.

Once the file download has completed, navigate to the download location and double-click the file to install. An installation window will pop up. It’s important that you tick the “Add Python 3.10 to PATH checkbox” at the bottom of the window, otherwise, again, you’ll encounter errors, when you try to run Automatic1111. Once you’ve ticked this checkbox, click the “Install Now” option, to install Python in the default location. The setup process won’t take long. When it’s finished, you’ll see a confirmation window. Click “Close”.

OK, that’s Python done. Onto the next step.

Install Git

The second step is to download and install the latest version of Git.

You’ll use Git in the next step, to copy the Automatic1111 files from GitHub. The GitHub website is where the Automatic1111 files are stored. Anyway, let’s continue with installing Git.

Open the Git page in your browser. At the top of the page, you’ll see a “Download” section for different operating systems. I’m running Windows, so I’ll click the “Windows” link. This takes me to the Windows download page. Under the “Standalone Installer” section, select either the 32-bit or 64-bit version. I’m running 64-bit Windows, so I’ll click the “64-bit Git for Windows Setup” link. Navigate to the location that you want to save the file to, I’ll select my E drive again, and then click “Save”.

Once the file download has completed, navigate to the download location and double-click the file to install. If a warning window pops up asking “Do you want to allow this app to make changes to your device”, click the “Yes” button. Just click next on all the installation windows that pop up, which will accept all the default installation settings. Click “Install” on the last window to complete the installation process.

Once complete, a Git installation completion message will be displayed. Untick the “View Release Notes” checkbox and click “Finish”.

OK, that’s Git done. Onto the next step.

Install Automatic1111

The third and final installation step is to download and install Automatic1111.

The download for Automatic1111 is a little different than simply downloading and installing a file. Instead, you’ll need to copy or “clone” the Automatic1111 files onto your computer.

Open the Automatic1111 GitHub page in your browser. Click the green “Code” button towards the top right of the page, and the clone window will slide out. Copy the cloning URL to your clipboard by clicking the “copy” icon.

Open File Explorer and navigate to and select the location where you want to install Automatic1111. I’ll create a new folder in my E drive and name it “Automatic1111”. I’ll double-click this folder to select it.

Now that you’re inside the specific location that you want to clone the Automatic1111 files into, click into the File Explorer address bar and type in “cmd” and press Enter. The Command Prompt window will open. At the prompt, type in “git”, then a space, then “clone”, then another space, and then using “CTRL+V” on your keyboard, paste the cloning URL that you copied from the Automatic1111 GitHub page. This is the command to clone the Automatic1111 repository at the specified GitHub URL location. Once you’ve done this, press “Enter”. The cloning of the Automatic1111 repository will begin. Make sure you don’t click in the Command Prompt window during the cloning process, otherwise the process will be paused. Once the cloning process has finished, the Command Prompt window will return to the starting prompt state, and you can then close the Command Prompt window.

Navigate to your previously selected installation location, which in my case is the “Automatic1111” folder in my E drive, and you’ll see a new folder has been created in there, named “stable-diffusion-webui”. This contains all the files and folders that were copied from the Automatic1111 GitHub repository. Open this folder. Scroll down to locate the “webui-user.bat” file. Double-click on it, to run Automatic1111. This will kick off the process to install all the required files. The first time you run this, it will take some time to complete.

When it’s finished, the Automatic1111 web UI will open automatically in a new browser tab.

That’s it, Automatic1111 is now installed.

Launch Automatic1111 Again

Next time you want to launch Automatic1111, you’ll do so by running the webui-user.bat file.

To do this, navigate into the “stable-diffusion-webui” folder. Scroll down and you’ll find the “webui-user.bat” file towards the end of the list of folders and files. Double-click the file to launch Automatic1111. The Command Prompt window will open and run automatically, and then, if everything is OK, Automatic1111 will open in your browser.

If you ever need to open Automatic1111 manually in your browser, you can just copy the URL from the Command Prompt window and paste it into your browser address bar.

Personally, I find it easier to just create a shortcut icon on my Desktop to launch Automatic1111, which you may also want to do.

Command Prompt Window

It’s worth pointing out, NOT to close the Command Prompt window when you’re using the Automatic1111 Web UI, otherwise Automatic1111 will stop working in your browser. Just let the Command Prompt window do its thing in the background.

Every time you do something in the Automatic1111 Web UI via your browser, the processes that execute, and their progress will be shown in the Command Prompt window, which is a useful thing to be able to check sometimes.

Improve Image Generation Speed

The next step is optional, but highly recommended. I’m going to edit the “webui-user.bat” file, to improve image generation speed.

Locate the “webui-user.bat” file. Right-click on it, and then “Edit in Notepad”. Directly after the “set COMMANDLINE_ARGS=” type “—xformers” That’s it. Easy. Save the file.

Update Automatic1111 Automatically

Again, the next step is optional, but highly recommended. I’m going to edit the “webui-user.bat” file again, to automatically update Automatic1111 every time it’s launched.

Open the “webui-user.bat” file in Notepad. In the empty line between the last two commands, type “git”, then a space, then “pull”. That’s it. Easy. Save the file.

Conclusion

You now have Stable Diffusion Automatic1111 installed and configured for image generation speed and auto updates.

There are many other command line arguments and settings that you could add, depending on your needs and preferences.

Although Automatic1111 does come with a default checkpoint model installed, I would recommend adding additional models as your next step.

Anyway, hope you found this tutorial helpful, and I’ll catch you in the next one.

Resources

Links

Download Python v3.10.6:
https://www.python.org/downloads/release/python-3106/

Download Git:
https://git-scm.com/downloads

Download Automatic1111:
https://github.com/AUTOMATIC1111/stable-diffusion-webui

Command Line Arguments and Settings:
https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Command-Line-Arguments-and-Settings

Syntax

Clone Automatic1111 from Git:
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git

Related Videos

How to Install Stable Diffusion Web UI Automatic1111 in 1 Click:
https://youtu.be/tjlb5B87Xmo

Leave a Reply

Your email address will not be published. Required fields are marked *