DCAI
Loading Light/Dark Toggl

[A1111 Stable Diffusion web UI] How to update and switch versions

⏱️7min read
📅 May 31, 2024
🔄 Jul 26, 2024
Category:📂 Novice
[A1111 Stable Diffusion web UI] How to update and switch versions featured Image
Supported by

Automatic1111 Stable Diffusion WebUI is updated frequently. However, updates can have adverse effects, such as changing the generated illustrations. To be able to cope with such situations, it is important to remember how to switch versions.

PR
GIGABYTE GeForce RTX 4070 GAMING OC V2 12G Graphics Card 3x WINDFORCE Fans 12GB 192-bit GDDR6X GV-N4070GAMING OCV2-12GD Video Cardの商品画像
GIGABYTE GeForce RTX 4070 GAMING OC V2 12G Graphics Card 3x WINDFORCE Fans 12GB 192-bit GDDR6X GV-N4070GAMING OCV2-12GD Video Card
🔗Newegg Link
Seasonic VERTEX GX-1200 1200W 80+ Gold ATX 3.0 & PCIe 5.0 Ready Full-Modular ATX Form Factor Low Noise Premium Japanese Capacitor 12 Year Warranty Nvidia RTX 30/40 Super AMD GPU Compatibleの商品画像
Seasonic VERTEX GX-1200 1200W 80+ Gold ATX 3.0 & PCIe 5.0 Ready Full-Modular ATX Form Factor Low Noise Premium Japanese Capacitor 12 Year Warranty Nvidia RTX 30/40 Super AMD GPU Compatible
🔗Newegg Link

How to check the version of Stable Diffusion WebUI

The version of Stable Diffusion WebUI can be checked in the terminal at startup or at the bottom of the Stable Diffusion WebUI browser.

Checking the version of Stable Diffusion WebUI (Terminal)
Where to check in at the terminal
Open Image
Check the version of Stable Diffusion WebUI (browser)
Where to check in your browser
Open Image

How to update Stable Diffusion WebUI

The way to update Stable Diffusion WebUI is simply to run the pull command using Git. We will explain step by step.

Open the stable-diffusion-webui folder: Open the stable-diffusion-webui folder in File Explorer.
Open a terminal: Right-click in the folder and select “Open in Terminal”. *If “Open in Terminal” is not available in the right-click menu, open a command prompt from the windows menu and use the “cd” command to go to the stable-diffusion-webui directory.
Screen after starting the terminal
The image is PowerShell, but command prompt and GitBash are also fine.
Open Image
Execute pull command: Once you are in the stable-diffusion-webui directory, run the pull command.
git pull
Check for updates: When the pull command is finished, close the terminal and start Stable Diffusion WebUI by running webui-user.bat. You will see the version in the terminal.

If an error occurs, reset the Stable Diffusion WebUI by referring to Reset Stable Diffusion WebUI in the Troubleshooting section described later.

How to revert to a specific version of Stable Diffusion WebUI

To revert to a specific version of Stable Diffusion WebUI, use the repository hash code and the checkout command. Here is an example of how to revert to v1.9.3.

Open the repository’s release page: Go to the Automatic/StableDiffusion release page.
Find the version you want to return: Find the desired version in the list and click on the hash code to the right. Copy the hash code after .../stable-diffusion-webui/commit/.
Automatic/StableDiffusion release page
Click on the red frame.
Open Image
Browser address window screen
Copy the selected area in blue.
Open Image
Execute checkout command: Open the stable-diffusion-webui directory in a terminal and run the checkout command with the hash code you just copied.
git checkout 1c0a0c4c26f78c32095ebc7f8af82f5c04fca8c0
Rebuild venv and check version: After the checkout command completes, close the terminal and open the stable-diffusion-webui folder in File Explorer. Next, delete the venv folder in the folder. After deleting it, run webui-user.bat for Stable Diffusion WebUI. If you see Version: v1.9.3 in the terminal, you have succeeded. At this point, wait for a while until the browser starts up because venv will start rebuilding.

How to automatically update the Stable Diffusion WebUI

Edit webui-user.bat: Right-click on webui-user.bat in the stable-diffusion-webui folder and open it in Notepad or a code editor.

Default state of webui-user.bat

@echo off

set PYTHON=
set GIT=
set VENV_DIR=
set COMMANDLINE_ARGS=

call webui.bat
Appended git pull: Add a git pull one line above the line that says call webui.bat at the bottom of the opened code and save it.

webui-user.bat after editing

@echo off

set PYTHON=
set GIT=
set VENV_DIR=
set COMMANDLINE_ARGS=

git pull
call webui.bat
Confirmation of git pull: If the terminal shows Already up to date. when you run webui-user.bat, it is working correctly.

With this setting, each time the system is started, it checks the repository for the latest version and downloads it if there is an update.

If an error occurs, reset the branch by referring to Reset Stable Diffusion WebUI in the Troubleshooting section later. In this case, webui-user.bat will be initialized and you will need to edit it again.

Troubleshooting Stable Diffusion WebUI Update

Reset Stable Diffusion WebUI

Switch to master branch: Open the stable-diffusion-webui directory in a terminal and force a switch to the master branch with the following code.
git checkout -f master
Download repository: Download the latest repository with the pull command.
git pull
Rebuild venv: When the pull command is complete, close the terminal and open the stable-diffusion-webui folder in File Explorer. Next, delete the venv folder in the folder. After deleting it, run webui-user.bat for Stable Diffusion WebUI.

Resetting Stable Diffusion WebUI will initialize webui-user.bat, so if you have entered --xformers, etc. in the COMMANDLINE_ARGS= line, you will need to enter it again.

After updating, it won't start

Rebuild the venv: delete the venv folder in the stable-diffusion-webui folder. After deletion, run webui-user.bat to start rebuilding venv, and wait for a while until the browser is up.

Can not generate the same image with Seed so far

Revert to a previous version or create a multi-version StableDiffusion WebUI environment by referring to “Seed Breaking Change” on the Stable Diffusion WebUI wiki.

PR
LaCie 1big Dock 10TB Dual Thunderbolt 3 / DisplayPort 1.4 / USB 3.0 / SD/CF Card Slots Professional Desktop Storage, Docking Station STHS10000800 Blackの商品画像
LaCie 1big Dock 10TB Dual Thunderbolt 3 / DisplayPort 1.4 / USB 3.0 / SD/CF Card Slots Professional Desktop Storage, Docking Station STHS10000800 Black
🔗Newegg Link
ASUS TUF Gaming NVIDIA GeForce RTX 4070 Ti SUPER OC Edition Gaming Graphics Card (PCIe 4.0 16GB GDDR6X HDMI 2.1a DisplayPort 1.4a) TUF-RTX4070TIS-O16G-GAMINGの商品画像
ASUS TUF Gaming NVIDIA GeForce RTX 4070 Ti SUPER OC Edition Gaming Graphics Card (PCIe 4.0 16GB GDDR6X HDMI 2.1a DisplayPort 1.4a) TUF-RTX4070TIS-O16G-GAMING
🔗Newegg Link
Supported by