We will go through how to download and install the popular Stable Diffusion software AUTOMATIC1111 on Windows step-by-step.
Stable Diffusion is a text-to-image AI that can be run on a consumer-grade PC with a GPU. After this tutorial, you can generate AI images on your own PC.
Contents
- Systems requirements
- Installation steps
- Options
- Next Step
- RTX 4000 series graphic cards
- Updating AUTOMATIC1111
- Web options to run AUTOMATIC1111
- Frequently Asked Questions
- AUTOMATIC1111 does not start after updating.
- Does it work on AMD GPU?
- What Python version should I use?
- How to resolve NaN errors when generating images?
- How to resolve out-of-memory errors?
- Python doesn’t work correctly.
- Is there an easier way to install AUTOMATIC1111?
- I tried everything, but it still does not work.
Systems requirements
Your PC should run Windows 10 or higher with a discrete Nvidia video card (GPU) with 4 GB VRAM or more. An integrated GPU will not work.
If your PC does not meet these requirements, alternatives are
- Cloud service – Google Colab.
- Mac Apple Silicon M1/M2.
Installation steps
Step 1: Install python
You will need Python 3.10.6. (DON’T use Python 3.11 or newer) There are two ways to install Python on Windows
Option 1: Install from the Microsoft store.
Option 2: Use the 64-bit Windows installer provided by the Python website. (If you use this option, make sure to select “Add Python to 3.10 to PATH“)
I recommend installing it from the Microsoft store.
First, remove all Python versions you have previously installed. You can do that in Control Panel → Add or remove programs.
Visit Python 3.10 on Microsoft Store and install the Python software.
This step is most likely to go wrong. Let’s do a check.
Press the Windows key on your keyboard and type “cmd” to find a program called “Command Prompt”.

Open the Command Prompt App. You should see a black terminal like you are a hacker…
Type “python” and press Enter. You should see you see it prints out Python 3.10. This tells you your Python is installed correctly.

Now you can close the Command Prompt App.
Don’t proceed to the next step until you get Python 3.10 installed correctly.
If you don’t see Python 3.10 running, try
- Restarting the PC
- Removing all the previous versions of Python and reinstalling from the Microsoft Store
- If the one from Microsoft Store doesn’t work for you, remove it and try the one on the Python website.
Step 2: Install git
Git is a code repository management system. You will need it to install and update AUTOMATIC1111.
Go to this page to download the windows version.
Open the installer. Click Install to accept the license and install the software.

Follow the instruction to complete the installation.
Step 3: Clone web-ui
This step downloads the Stable Diffusion software (AUTOMATIC1111).
Press the Window key (It should be on the left of the space bar on your keyboard), and a search window should appear. Type cmd
.

Click on Command Prompt. The command prompt window would show up.
First, make sure you are in your home folder by typing the following command and then pressing Enter. (Tip: You should be able to use right-click to paste in Command Prompt.)
cd %userprofile%
You should see your prompt shows something like C:\Users\YOUR_USER_NAME
>.
Next type the following command and press Enter to clone the AUTOMATIC1111 repository.
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git

A folder called stable-diffusion-webui
should be created in your home directory.
It’s ok to clone the repository in a different folder instead of %userprofile%
, as long as you can find the newly created stable-diffusion-webui
folder. You will need to change the folder location accordingly in the following steps.
Step 4: Download a model file
Next, go to the newly created folder in File Explorer. Put in
%userprofile%\stable-diffusion-webui
in the address bar and press enter.

Navigate to the folder models and then Stable-diffusion. You should see a file Put Stable Diffusion checkpoints here.txt
like below.

Download the Stable Diffusion v1.5 model checkpoint file (download link). Put it in that folder.
Step 5: Run webui
Now in File Explorer, go back to the stable-diffusion-webui
folder. That is, go back up two levels or type
%userprofile%\stable-diffusion-webui
again in the address bar.
Find a file called webui-user.bat
. Double-click to run and complete the installation.

This last step is going to take a while. When it is done, you will see a message
Running on local URL: http://127.0.0.1:7860
like the one below.

In your web browser, go to the URL
http://127.0.0.1:7860/
You should see the AUTOMATIC1111 webui! Put in a prompt (e.g. “a cat”) and hit Generate to test if Stable Diffusion is running correctly.

When you are done using Stable Diffusion, close the cmd
black window to shut down Stable Diffusion.
To rerun Stable Diffusion, you need to double-click the webui-user.bat
.
Options
You can speed up Stable Diffusion with the --xformers
option. If you have less than 8 GB VRAM on GPU, it is a good idea to turn on the --medvram
option to save memory to generate more images at a time.
To enable them, right-click on the file webui-user.bat
and select Edit. (You may need to select “Show More Options” first if you use Windows 11).
Replace the line
set COMMANDLINE_ARGS=
With
set COMMANDLINE_ARGS=--xformers --medvram
Save and close the file.

Double-click the webui-user.bat
file to run Stable Diffusion.
Additional arguments
Use the argument --gradio-img2img-tool color-sketch
to enable the color sketch tool, which could be helpful in img2img.
If you want to use the computer as a server and access the GUI with another computer, use the argument --listen
to enable a connection from another computer. You will need to set the firewall appropriately on the server, and this is beyond the scope of this installation guide.
Next Step
That’s it! I hope you will have fun making AI images.
If you are new to Stable Diffusion, check out the Quick Start Guide for some quick tips to use Stable Diffusion.
Head to our beginner’s series to learn Stable Diffusion step by step.
Check out this prompt generator for building high-quality prompts.
RTX 4000 series graphic cards
Good news for you if you use RTX 4070, RTX 4080 or RTX 4090 Nvidia graphic cards. The latest version of AUTOMATIC1111 supports these video card. (with torch 2.0 and cuda 11.8)
I will provide a benchmark speed so that you can make sure your setup is working correctly. The settings are:
- batch size: 4
- batch count: 10
- Image size: 512×512
- Sampling steps: 20
- Sampling method: Euler a
- Model: SD v1.5
Using a batch size of 1 is not recommended, as the measured speed is likely to be highly dependent on other components on your system.
You should see the speed of generating each image. Pick a stable value, usually in the middle like the 5th batch. The speed is in it/s (iterations per second).
You should get about 10 its/s on RTX 4090. (Note that this is 4 images per iteration) This is the max speed you can get nowadays.
You can use one of the following speed-up parameters.
Option 1:
--xformers
Option 2:
--opt-sdp-no-mem-attention --no-half-vae --opt-channelslast
Option 2 is slightly faster, but test them out to see what works best for you.
Updating AUTOMATIC1111
By default, your copy of AUTOMATIC1111 won’t be automatically updated. Given how fast things are moving, you will likely need to update your copy at some point to use the latest and the coolest.
There are two options for updating it. (1) Updating every time when you run it, and (2) Updating only when needed.
Updating every time you run
To update whenever you run webui, edit the file webui-user.bat
. Add “git pull” before the line calling webui.bat. The file should look something like
@echo off
set PYTHON=
set GIT=
set VENV_DIR=
set COMMANDLINE_ARGS=--xformers --medvram
git pull
call webui.bat
From now on, webui will update itself every time it starts.
Updating as needed
It may not be a good idea to use the latest version because something could be broken. Updating periodically or only if you need a new feature is a more prudent approach.
To update the webui, open Command Prompt (cmd) and go to webui’s directory using the command below. (You will need to change %userprofile%
if you installed it somewhere else.)
cd %userprofile%\stable-diffusion-webui
And run the command
git pull
Resetting webui
If git pull shows an error, it is usually because you have accidentally changed some files. You can reset the webui folder with the following two commands.
cd %userprofile%\stable-diffusion-webui
git checkout -f master
And then run git pull again.
git pull
Note that all files will be reset. You will need to make changes to webui-user.bat
again.
Reverting back to a previous version
Sometimes the latest version of webui is broken, and you don’t want to use it. You can revert back to a previous version by following the instructions below.
Step 1: Go to this page to view previous versions. Each row is a previous version.
Step 2: Pick a previous version you want to revert back to. You can look at the date and comment to make a judgment.
Step 3: Press the copy button to copy the hash code of the version.

Step 4: In the command prompt, run the following commands. The hash code (highlighted below) is just an example. You will paste the one you just copied.
cd %userprofile%\stable-diffusion-webui
git checkout 076d624a297532d6e4abebe5807fd7c7504d7a73
If you see errors, reset the webui (see the previous section) and retry.
After checking out the previous code, delete the venv
folder and restart WebUI.
Web options to run AUTOMATIC1111
Consider the following options for running Stable Diffusion without installing it locally.
(I earn a small commission if you subscribe.)
Graviti Diffus

Graviti Diffus lets you use AUTOMATIC1111 without having a GPU. The service is provided remotely. Follow the link to get an extra 20% credit!
Frequently Asked Questions
AUTOMATIC1111 does not start after updating.
Delete the venv
folder and restart AUTOMATIC1111.
If it still doesn’t work, delete both the venv
and the repositories
folders and restart.
If it still doesn’t work and you have recently installed an extension, delete the folder of that extension in the extensions
folder. Delete the venv
folder and restart.
Does it work on AMD GPU?
No, you have to have an NVIDIA GPU.
What Python version should I use?
Python 3.10.6. Later versions of 3.10 work fine. But don’t use 3.11 or later.
How to resolve NaN errors when generating images?
Add --no-half
argument to webui-user.bat (See Adding arguments)
How to resolve out-of-memory errors?
Use --low-vram
instead of --med-vram
argument in webui-user.bat (See Adding arguments)
Python doesn’t work correctly.
Try removing the previously installed Python using Add or remove programs.
There are two options for installing Python listed. Try the other one if the one you used didn’t work.
Is there an easier way to install AUTOMATIC1111?
The above is the official install instructions. Two alternatives:
- Recently they started to tag release builds. They are supposed to work after downloading and unzipping.
- There’s an unofficial easy installer for Windows you can try.
I tried everything, but it still does not work.
You can use Google Colab to run AUTOMATIC1111. This is what I use. The notebook launches AUTOMATIC1111 with one mouse click.
Or Use AUTOMATIC1111 online.
Any chance someone put this v1-5-pruned-emaonly.ckpt in a torrent, the download rate from South America is 150kb/sec we need that as p2p or in another server.
Yes most ckpts are on torrent. You can use aria2c. See the google colab notebook in the quick start guide for code examples.
Sorry but how does one get the torrent or find it? I havent heard of aria2c before and I’m not really sure how it works and how it connects with ‘the google colab notebook in the quick start guide’ you said afterwards and that I have open. I just wanted to download v1-5-pruned-emaonly.ckpt as a torrent to finish this tutorial: https://www.youtube.com/watch?v=3cvP7yJotUM&t=19s
It’s a command-line torrent tool. I used it in the colab notebook, so you can copy the command line arguments if you want.
That’s the only experience in torrent I have.
Creating venv in directory C:\Users\щщ\stable-diffusion-webui\venv using python “C:\Users\∙∙\AppData\Local\Programs\Python\Python310\python.exe”
Unable to create venv in directory “C:\Users\…..\stable-diffusion-webui\venv”
exit code: 3
stderr:
doesen`t working…i erased the webui folder…same fault again.
Iam not satisfied.
Hi, I did some google search for you and could be related to this issue
https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/7358
Your username may be of special characters that python doesn’t like.Try installing on a path without special characters, or use colab notebook my site provided in Quick Start Guide.
venv “C:\Users\31704\stable-diffusion-webui\venv\Scripts\Python.exe”
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Commit hash: 0cc0ee1bcb4c24a8c9715f66cede06601bfc00c8
Traceback (most recent call last):
File “C:\Users\31704\stable-diffusion-webui\launch.py”, line 360, in
prepare_environment()
File “C:\Users\31704\stable-diffusion-webui\launch.py”, line 272, in prepare_environment
run_python(“import torch; assert torch.cuda.is_available(), ‘Torch is not able to use GPU; add –skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check'”)
File “C:\Users\31704\stable-diffusion-webui\launch.py”, line 129, in run_python
return run(f'”{python}” -c “{code}”‘, desc, errdesc)
File “C:\Users\31704\stable-diffusion-webui\launch.py”, line 105, in run
raise RuntimeError(message)
RuntimeError: Error running command.
Command: “C:\Users\31704\stable-diffusion-webui\venv\Scripts\python.exe” -c “import torch; assert torch.cuda.is_available(), ‘Torch is not able to use GPU; add –skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check'”
Error code: 1
stdout:
stderr: C:\Users\31704\stable-diffusion-webui\venv\lib\site-packages\torch\cuda\__init__.py:88: UserWarning: CUDA initialization: The NVIDIA driver on your system is too old (found version 10020). Please update your GPU driver by downloading and installing a new version from the URL: http://www.nvidia.com/Download/index.aspx Alternatively, go to: https://pytorch.org to install a PyTorch version that has been compiled with your version of the CUDA driver. (Triggered internally at ..\c10\cuda\CUDAFunctions.cpp:109.)
return torch._C._cuda_getDeviceCount() > 0
Traceback (most recent call last):
File “”, line 1, in
AssertionError: Torch is not able to use GPU; add –skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check
请按任意键继续. . .
please help me
Hi,
Looks like the error message has provided the solution:
The NVIDIA driver on your system is too old (found version 10020). Please update your GPU driver by downloading and installing a new version from the URL: http://www.nvidia.com/Download/index.aspx Alternatively, go to: https://pytorch.org to install a PyTorch version that has been compiled with your version of the CUDA driver.
when I double click on webui-user.bat it returns me this error:
venv “E:\SD\stable-diffusion-webui\venv\Scripts\Python.exe”
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Commit hash: 0cc0ee1bcb4c24a8c9715f66cede06601bfc00c8
Installing gfpgan
Traceback (most recent call last):
File “E:\SD\stable-diffusion-webui\launch.py”, line 360, in
prepare_environment()
File “E:\SD\stable-diffusion-webui\launch.py”, line 275, in prepare_environment
run_pip(f”install {gfpgan_package}”, “gfpgan”)
File “E:\SD\stable-diffusion-webui\launch.py”, line 137, in run_pip
return run(f'”{python}” -m pip {args} –prefer-binary{index_url_line}’, desc=f”Installing {desc}”, errdesc=f”Couldn’t install {desc}”)
File “E:\SD\stable-diffusion-webui\launch.py”, line 105, in run
raise RuntimeError(message)
RuntimeError: Couldn’t install gfpgan.
Command: “E:\SD\stable-diffusion-webui\venv\Scripts\python.exe” -m pip install git+https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379 –prefer-binary
Error code: 1
stdout: Collecting git+https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379
Cloning https://github.com/TencentARC/GFPGAN.git (to revision 8d2447a2d918f8eba5a4a01463fd48e45126a379) to c:\users\zoid\appdata\local\temp\pip-req-build-nqdkt3oj
stderr: Running command git clone –filter=blob:none –quiet https://github.com/TencentARC/GFPGAN.git ‘C:\Users\Zoid\AppData\Local\Temp\pip-req-build-nqdkt3oj’
fatal: unable to access ‘https://github.com/TencentARC/GFPGAN.git/’: Failed to connect to github.com port 443 after 21065 ms: Couldn’t connect to server
error: subprocess-exited-with-error
git clone –filter=blob:none –quiet https://github.com/TencentARC/GFPGAN.git ‘C:\Users\Zoid\AppData\Local\Temp\pip-req-build-nqdkt3oj’ did not run successfully.
exit code: 128
See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
git clone –filter=blob:none –quiet https://github.com/TencentARC/GFPGAN.git ‘C:\Users\Zoid\AppData\Local\Temp\pip-req-build-nqdkt3oj’ did not run successfully.
exit code: 128
See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
what can i do?
Hi, it says your PC cannot connect to github. Check to see if you can go here: https://github.com/TencentARC/GFPGAN.git
If you can, it was likely a temporary issue. You can try again.
Hi, I was wondering what I could do if my installation is stuck on this.
venv “C:\Users\matth\stable-diffusion-webui\venv\Scripts\Python.exe”
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Commit hash: 65995a2ea38a1a0afd06cb508a4f65fd0d3a1743
Installing gfpgan
It does not move past this stage and I followed the instructions as much as I could, any help would be much appreciated.
Sorry I don’t have any experience in this issue. Please google and see if others have the same issue.
venv “C:\Users\pc\stable-diffusion-webui\venv\Scripts\Python.exe”
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Commit hash: 65995a2ea38a1a0afd06cb508a4f65fd0d3a1743
Installing torch and torchvision
C:\Users\pc\stable-diffusion-webui\venv\Scripts\python.exe: No module named pip
Traceback (most recent call last):
File “C:\Users\pc\stable-diffusion-webui\launch.py”, line 360, in
prepare_environment()
File “C:\Users\pc\stable-diffusion-webui\launch.py”, line 269, in prepare_environment
run(f'”{python}” -m {torch_command}’, “Installing torch and torchvision”, “Couldn’t install torch”, live=True)
File “C:\Users\pc\stable-diffusion-webui\launch.py”, line 89, in run
raise RuntimeError(f”””{errdesc or ‘Error running command’}.
RuntimeError: Couldn’t install torch.
Command: “C:\Users\pc\stable-diffusion-webui\venv\Scripts\python.exe” -m pip install torch==1.13.1+cu117 torchvision==0.14.1+cu117 –extra-index-url https://download.pytorch.org/whl/cu117
Error code: 1
Press any key to continue . . .
hi !
really need help with what`s happening above, thanks!
There seems to be no pip installed in your Python
Try running the command in cmd
C:\Users\pc\stable-diffusion-webui\venv\Scripts\python.exe -m ensurepip –upgrade
venv “C:\Users\Chris\stable-diffusion-webui\venv\Scripts\Python.exe”
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Commit hash: ea9bd9fc7409109adcd61b897abc2c8881161256
Installing requirements for Web UI
Launching Web UI with arguments:
No module ‘xformers’. Proceeding without it.
Loading weights [cc6cb27103] from C:\Users\Chris\stable-diffusion-webui\models\Stable-diffusion\v1-5-pruned-emaonly.ckpt
Creating model from config: C:\Users\Chris\stable-diffusion-webui\configs\v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
Applying cross attention optimization (Doggettx).
Textual inversion embeddings loaded(0):
Model loaded in 3.3s (load weights from disk: 0.8s, create model: 0.4s, apply weights to model: 0.4s, apply half(): 0.6s, move model to device: 0.4s, load textual inversion embeddings: 0.6s).
Running on local URL: http://127.0.0.1:7860
To create a public link, set `share=True` in `launch()`.
Traceback (most recent call last):
File “C:\Users\Chris\stable-diffusion-webui\launch.py”, line 361, in
start()
File “C:\Users\Chris\stable-diffusion-webui\launch.py”, line 356, in start
webui.webui()
File “C:\Users\Chris\stable-diffusion-webui\webui.py”, line 232, in webui
app.add_middleware(GZipMiddleware, minimum_size=1000)
File “C:\Users\Chris\stable-diffusion-webui\venv\lib\site-packages\starlette\applications.py”, line 135, in add_middleware
raise RuntimeError(“Cannot add middleware after an application has started”)
RuntimeError: Cannot add middleware after an application has started
Press any key to continue . . .
Can’t seem to get it to work. RTX 4090, Ryzen 7900x.
Not your fault — there’s a bug in AUTOMATIC1111 right now. Hope they resolve soon.
There’s a workaround in the following discussion
https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/7714#issuecomment-1426058038
Hello, i follow every step exactly, but at step 5, after run the webui-user.bat, following happened:
Couldn’t launch python
exit code: 9009
stderr:
Python konnte nicht gefunden werden. F・ren Sie die Verkn・fung ohne Argumente aus, um sie ・er den Microsoft Store zu installieren, oder deaktivieren Sie diese Verkn・fung unter
Launch unsuccessful. Exiting.
Drücken Sie eine beliebige Taste . . .
Have someone an idea?
Best regards
Hi, looks like there’s a problem with your python install. Did you check “Add Python 3.10 to PATH” during install?
I followed the steps exactly, but i don’t have webui-user.bat file. Only these…https://gyazo.com/a66069de7ba44aef8b2c315cfb496ae6
Could one of these be correct, but just named differently?
Hi, it is one of the webui-user. You will need to find out which one…. The reason it is not showing is file name extension is hidden.
You can try showing file name extension
https://support.microsoft.com/en-us/windows/common-file-name-extensions-in-windows-da4a4430-8e76-89c5-59f7-1cdbbc75cb01
It’s run smooth ! thanks a lot
btw I’ve problem with sd2 model but 1.5 is fine
Great!
It should work with v2 models. Have you follow instructions, esp copying and naming the config file for the model correctly? See
https://stable-diffusion-art.com/install-stable-diffusion-2-1/
venv “C:\Users\user\stable-diffusion-webui\venv\Scripts\Python.exe”
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Commit hash: 226d840e84c5f306350b0681945989b86760eXXX
Installing gfpgan
Traceback (most recent call last):
File “C:\Users\user\stable-diffusion-webui\launch.py”, line 360, in
prepare_environment()
File “C:\Users\user\stable-diffusion-webui\launch.py”, line 275, in prepare_environment
run_pip(f”install {gfpgan_package}”, “gfpgan”)
File “C:\Users\user\stable-diffusion-webui\launch.py”, line 137, in run_pip
return run(f'”{python}” -m pip {args} –prefer-binary{index_url_line}’, desc=f”Installing {desc}”, errdesc=f”Couldn’t install {desc}”)
File “C:\Users\user\stable-diffusion-webui\launch.py”, line 105, in run
raise RuntimeError(message)
RuntimeError: Couldn’t install gfpgan.
Command: “C:\Users\user\stable-diffusion-webui\venv\Scripts\python.exe” -m pip install git+https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379 –prefer-binary
Error code: 1
stdout: Collecting git+https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379
Cloning https://github.com/TencentARC/GFPGAN.git (to revision 8d2447a2d918f8eba5a4a01463fd48e45126a379) to c:\users\beiji\appdata\local\temp\pip-req-build-k1zuu77u
stderr: Running command git clone –filter=blob:none –quiet https://github.com/TencentARC/GFPGAN.git ‘C:\Users\beiji\AppData\Local\Temp\pip-req-build-k1zuu77u’
fatal: unable to access ‘https://github.com/TencentARC/GFPGAN.git/’: Recv failure: Connection was reset
fatal: could not fetch fa702eeacff13fe8475b0e102a8b8c37602f3963 from promisor remote
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with ‘git status’
and retry with ‘git restore –source=HEAD :/’
error: subprocess-exited-with-error
git clone –filter=blob:none –quiet https://github.com/TencentARC/GFPGAN.git ‘C:\Users\beiji\AppData\Local\Temp\pip-req-build-k1zuu77u’ did not run successfully.
exit code: 128
See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
git clone –filter=blob:none –quiet https://github.com/TencentARC/GFPGAN.git ‘C:\Users\beiji\AppData\Local\Temp\pip-req-build-k1zuu77u’ did not run successfully.
exit code: 128
See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
[notice] A new release of pip available: 22.2.1 -> 23.0
[notice] To update, run: C:\Users\user\stable-diffusion-webui\venv\Scripts\python.exe -m pip install –upgrade pip
I stuck at installing gfpgan…. what can I do?
It complained you had modified the gfpgan folder. You can try removing it and restart.
I find myself puzzled. Upon initially running the webui.bat file, the Command Prompt listing progressed to a notice of a new release of pip available: 22.2.1 -> 22.3.1; from there, as I recall it, it then reached the point of the line “Cloning Taming Transformers into repositories\taming-transformers…” and did not continue further. Subsequently, I updated to the 22.3.1, and ran webui.bat again, to come upon this:
venv “C:\Users\USER\stable-diffusion-webui\venv\Scripts\Python.exe”
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Commit hash: 7a14c8ab45da8a681792a6331d48a88dd684a0a9
Traceback (most recent call last):
File “C:\Users\USER\stable-diffusion-webui\launch.py”, line 324, in
prepare_environment()
File “C:\Users\USER\stable-diffusion-webui\launch.py”, line 265, in prepare_environment
git_clone(taming_transformers_repo, repo_dir(‘taming-transformers’), “Taming Transformers”, taming_transformers_commit_hash)
File “C:\Users\USER\stable-diffusion-webui\launch.py”, line 120, in git_clone
current_hash = run(f'”{git}” -C “{dir}” rev-parse HEAD’, None, f”Couldn’t determine {name}’s hash: {commithash}”).strip()
File “C:\Users\USER\stable-diffusion-webui\launch.py”, line 74, in run
raise RuntimeError(message)
RuntimeError: Couldn’t determine Taming Transformers’s hash: 24268930bf1dce879235a7fddd0b2355b84d7ea6.
Command: “git” -C “repositories\taming-transformers” rev-parse HEAD
Error code: 128
stdout: HEAD
stderr: fatal: ambiguous argument ‘HEAD’: unknown revision or path not in the working tree.
Use ‘–‘ to separate paths from revisions, like this:
‘git […] — […]’
Press any key to continue . . .
This seems as though I’m overlooking something or managed to make a mistake somewhere, but what the issue is, I can’t say. Thus, any insight would be appreciated.
The pip upgrade is optional. I think they suppose you to run webui-user.bat. You can try deleting and recloning the webui folder. Then run webui.bat again to see if you can get pass taming transformers.
I’ve tried to launch stable diffusion a few times and this is the error I get.
Couldn’t launch python
exit code: 9009
stderr:
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.
Launch unsuccessful. Exiting.
Press any key to continue . . .
I have the minimum PC requirements, Git, Python 3.10.6, and I selected add python to path.
Open the command prompt (cmd). Type python. Do you see python is launch?
Are you running webui-user.bat?
Thanks for the help. Took a few hours but it finished. No error this time but the text is different from that of the guide’s and I am unsure of what to do here:
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Commit hash: 48a15821de768fea76e66f26df83df3fddf18f4b
Installing torch and torchvision
Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cu117
Collecting torch==1.13.1+cu117
Using cached https://download.pytorch.org/whl/cu117/torch-1.13.1%2Bcu117-cp310-cp310-win_amd64.whl (2255.4 MB)
Collecting torchvision==0.14.1+cu117
Using cached https://download.pytorch.org/whl/cu117/torchvision-0.14.1%2Bcu117-cp310-cp310-win_amd64.whl (4.8 MB)
Collecting typing-extensions
Using cached typing_extensions-4.4.0-py3-none-any.whl (26 kB)
Collecting pillow!=8.3.*,>=5.3.0
Using cached Pillow-9.4.0-cp310-cp310-win_amd64.whl (2.5 MB)
Collecting requests
Using cached requests-2.28.2-py3-none-any.whl (62 kB)
Collecting numpy
Using cached numpy-1.24.1-cp310-cp310-win_amd64.whl (14.8 MB)
Collecting certifi>=2017.4.17
Using cached certifi-2022.12.7-py3-none-any.whl (155 kB)
Collecting charset-normalizer=2
Using cached charset_normalizer-3.0.1-cp310-cp310-win_amd64.whl (96 kB)
Collecting urllib3=1.21.1
Using cached urllib3-1.26.14-py2.py3-none-any.whl (140 kB)
Collecting idna=2.5
Using cached idna-3.4-py3-none-any.whl (61 kB)
Installing collected packages: charset-normalizer, urllib3, typing-extensions, pillow, numpy, idna, certifi, torch, requests, torchvision
Successfully installed certifi-2022.12.7 charset-normalizer-3.0.1 idna-3.4 numpy-1.24.1 pillow-9.4.0 requests-2.28.2 torch-1.13.1+cu117 torchvision-0.14.1+cu117 typing-extensions-4.4.0 urllib3-1.26.14
Installing gfpgan
Installing clip
Installing open_clip
Cloning Stable Diffusion into repositories\stable-diffusion-stability-ai…
Cloning Taming Transformers into repositories\taming-transformers…
Cloning K-diffusion into repositories\k-diffusion…
Cloning CodeFormer into repositories\CodeFormer…
Cloning BLIP into repositories\BLIP…
Installing requirements for CodeFormer
Installing requirements for Web UI
Launching Web UI with arguments:
No module ‘xformers’. Proceeding without it.
No checkpoints found. When searching for checkpoints, looked at:
– file C:\Users\TT\Downloads\sd.webui\webui\model.ckpt
– directory C:\Users\TT\Downloads\sd.webui\webui\models\Stable-diffusion
Can’t run without a checkpoint. Find and place a .ckpt file into any of those locations. The program will exit.
Press any key to continue . . .
Terminate batch job (Y/N)?
It’s missing the model file. You will need to follow something similar to STEP 4, but putting the model file in \sd.webui\webui\models\Stable-diffusion instead.
Do I just open cmd and enter that or is there more? also are there any risks in dooing this or has it already been tried?
Yes just open cmd and run. Then try run.bat again.
But if you are not comfortable fixing bugs on your system, you should run in Colab.
Sorry for responding so late. It froze my screen for about 40 minutes and just finished.
Here is the error I got:
ERROR: Exception:
Traceback (most recent call last):
File “C:\Users\TT\Downloads\sd.webui\system\python\lib\site-packages\pip\_internal\cli\base_command.py”, line 160, in exc_logging_wrapper
status = run_func(*args)
File “C:\Users\TT\Downloads\sd.webui\system\python\lib\site-packages\pip\_internal\cli\req_command.py”, line 247, in wrapper
return func(self, options, args)
File “C:\Users\TT\Downloads\sd.webui\system\python\lib\site-packages\pip\_internal\commands\install.py”, line 400, in run
requirement_set = resolver.resolve(
File “C:\Users\TT\Downloads\sd.webui\system\python\lib\site-packages\pip\_internal\resolution\resolvelib\resolver.py”, line 92, in resolve
result = self._result = resolver.resolve(
File “C:\Users\TT\Downloads\sd.webui\system\python\lib\site-packages\pip\_vendor\resolvelib\resolvers.py”, line 481, in resolve
state = resolution.resolve(requirements, max_rounds=max_rounds)
File “C:\Users\TT\Downloads\sd.webui\system\python\lib\site-packages\pip\_vendor\resolvelib\resolvers.py”, line 348, in resolve
self._add_to_criteria(self.state.criteria, r, parent=None)
File “C:\Users\TT\Downloads\sd.webui\system\python\lib\site-packages\pip\_vendor\resolvelib\resolvers.py”, line 172, in _add_to_criteria
if not criterion.candidates:
File “C:\Users\TT\Downloads\sd.webui\system\python\lib\site-packages\pip\_vendor\resolvelib\structs.py”, line 151, in __bool__
return bool(self._sequence)
File “C:\Users\TT\Downloads\sd.webui\system\python\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py”, line 155, in __bool__
return any(self)
File “C:\Users\TT\Downloads\sd.webui\system\python\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py”, line 143, in
return (c for c in iterator if id(c) not in self._incompatible_ids)
File “C:\Users\TT\Downloads\sd.webui\system\python\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py”, line 47, in _iter_built
candidate = func()
File “C:\Users\TT\Downloads\sd.webui\system\python\lib\site-packages\pip\_internal\resolution\resolvelib\factory.py”, line 206, in _make_candidate_from_link
self._link_candidate_cache[link] = LinkCandidate(
File “C:\Users\TT\Downloads\sd.webui\system\python\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py”, line 297, in __init__
super().__init__(
File “C:\Users\TT\Downloads\sd.webui\system\python\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py”, line 162, in __init__
self.dist = self._prepare()
File “C:\Users\TT\Downloads\sd.webui\system\python\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py”, line 231, in _prepare
dist = self._prepare_distribution()
File “C:\Users\TT\Downloads\sd.webui\system\python\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py”, line 308, in _prepare_distribution
return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
File “C:\Users\TT\Downloads\sd.webui\system\python\lib\site-packages\pip\_internal\operations\prepare.py”, line 491, in prepare_linked_requirement
return self._prepare_linked_requirement(req, parallel_builds)
File “C:\Users\TT\Downloads\sd.webui\system\python\lib\site-packages\pip\_internal\operations\prepare.py”, line 536, in _prepare_linked_requirement
local_file = unpack_url(
File “C:\Users\TT\Downloads\sd.webui\system\python\lib\site-packages\pip\_internal\operations\prepare.py”, line 166, in unpack_url
file = get_http_url(
File “C:\Users\TT\Downloads\sd.webui\system\python\lib\site-packages\pip\_internal\operations\prepare.py”, line 107, in get_http_url
from_path, content_type = download(link, temp_dir.path)
File “C:\Users\TT\Downloads\sd.webui\system\python\lib\site-packages\pip\_internal\network\download.py”, line 134, in __call__
resp = _http_get_download(self._session, link)
File “C:\Users\TT\Downloads\sd.webui\system\python\lib\site-packages\pip\_internal\network\download.py”, line 117, in _http_get_download
resp = session.get(target_url, headers=HEADERS, stream=True)
File “C:\Users\TT\Downloads\sd.webui\system\python\lib\site-packages\pip\_vendor\requests\sessions.py”, line 600, in get
return self.request(“GET”, url, **kwargs)
File “C:\Users\TT\Downloads\sd.webui\system\python\lib\site-packages\pip\_internal\network\session.py”, line 518, in request
return super().request(method, url, *args, **kwargs)
File “C:\Users\TT\Downloads\sd.webui\system\python\lib\site-packages\pip\_vendor\requests\sessions.py”, line 587, in request
resp = self.send(prep, **send_kwargs)
File “C:\Users\TT\Downloads\sd.webui\system\python\lib\site-packages\pip\_vendor\requests\sessions.py”, line 701, in send
r = adapter.send(request, **kwargs)
File “C:\Users\TT\Downloads\sd.webui\system\python\lib\site-packages\pip\_vendor\cachecontrol\adapter.py”, line 48, in send
cached_response = self.controller.cached_request(request)
File “C:\Users\TT\Downloads\sd.webui\system\python\lib\site-packages\pip\_vendor\cachecontrol\controller.py”, line 155, in cached_request
resp = self.serializer.loads(request, cache_data, body_file)
File “C:\Users\TT\Downloads\sd.webui\system\python\lib\site-packages\pip\_vendor\cachecontrol\serialize.py”, line 95, in loads
return getattr(self, “_loads_v{}”.format(ver))(request, data, body_file)
File “C:\Users\TT\Downloads\sd.webui\system\python\lib\site-packages\pip\_vendor\cachecontrol\serialize.py”, line 186, in _loads_v4
cached = msgpack.loads(data, raw=False)
File “C:\Users\TT\Downloads\sd.webui\system\python\lib\site-packages\pip\_vendor\msgpack\fallback.py”, line 125, in unpackb
ret = unpacker._unpack()
File “C:\Users\TT\Downloads\sd.webui\system\python\lib\site-packages\pip\_vendor\msgpack\fallback.py”, line 590, in _unpack
ret[key] = self._unpack(EX_CONSTRUCT)
File “C:\Users\TT\Downloads\sd.webui\system\python\lib\site-packages\pip\_vendor\msgpack\fallback.py”, line 590, in _unpack
ret[key] = self._unpack(EX_CONSTRUCT)
File “C:\Users\TT\Downloads\sd.webui\system\python\lib\site-packages\pip\_vendor\msgpack\fallback.py”, line 544, in _unpack
typ, n, obj = self._read_header()
File “C:\Users\TT\Downloads\sd.webui\system\python\lib\site-packages\pip\_vendor\msgpack\fallback.py”, line 486, in _read_header
obj = self._read(n)
File “C:\Users\TT\Downloads\sd.webui\system\python\lib\site-packages\pip\_vendor\msgpack\fallback.py”, line 403, in _read
ret = self._buffer[i : i + n]
MemoryError
WARNING: There was an error checking the latest version of pip.
Traceback (most recent call last):
File “C:\Users\TT\Downloads\sd.webui\webui\launch.py”, line 324, in
prepare_environment()
File “C:\Users\TT\Downloads\sd.webui\webui\launch.py”, line 233, in prepare_environment
run(f'”{python}” -m {torch_command}’, “Installing torch and torchvision”, “Couldn’t install torch”, live=True)
File “C:\Users\TT\Downloads\sd.webui\webui\launch.py”, line 58, in run
raise RuntimeError(f”””{errdesc or ‘Error running command’}.
RuntimeError: Couldn’t install torch.
Command: “C:\Users\TT\Downloads\sd.webui\system\python\python.exe” -m pip install torch==1.13.1+cu117 torchvision==0.14.1+cu117 –extra-index-url https://download.pytorch.org/whl/cu117
Error code: 2
Press any key to continue . . .
I think its a bug in pip. If you are comfortable using command prompt, open cmd and run
C:\Users\TT\Downloads\sd.webui\system\python\python.exe -m pip install --upgrade pip
and try run.bat again.
If you still have problem, you can always use A1111 with the Colab notebook in the Quick Start Guide.
Thanks for the response. I have 8 gb of ram, i5-7400 CPU, and gtx 1660 super.
Do I do anything with the file after unzipping it like putting it into the stable diffusion folder, or do I just click run.bat without doing anything else?
Hi Mike, you can put the unzipped folder anywhere you want. You can just double click run.bat
Thanks for the guide. I followed it step by step but I keep coming across the same error when I click “webui-user.bat”:
ERROR: Exception:
Traceback (most recent call last):
File “C:\Users\TT\Downloads\stable-diffusion-webui\venv\lib\site-packages\pip\_internal\cli\base_command.py”, line 167, in exc_logging_wrapper
status = run_func(*args)
File “C:\Users\TT\Downloads\stable-diffusion-webui\venv\lib\site-packages\pip\_internal\cli\req_command.py”, line 247, in wrapper
return func(self, options, args)
File “C:\Users\TT\Downloads\stable-diffusion-webui\venv\lib\site-packages\pip\_internal\commands\install.py”, line 369, in run
requirement_set = resolver.resolve(
File “C:\Users\TT\Downloads\stable-diffusion-webui\venv\lib\site-packages\pip\_internal\resolution\resolvelib\resolver.py”, line 92, in resolve
result = self._result = resolver.resolve(
File “C:\Users\TT\Downloads\stable-diffusion-webui\venv\lib\site-packages\pip\_vendor\resolvelib\resolvers.py”, line 481, in resolve
state = resolution.resolve(requirements, max_rounds=max_rounds)
File “C:\Users\TT\Downloads\stable-diffusion-webui\venv\lib\site-packages\pip\_vendor\resolvelib\resolvers.py”, line 348, in resolve
self._add_to_criteria(self.state.criteria, r, parent=None)
File “C:\Users\TT\Downloads\stable-diffusion-webui\venv\lib\site-packages\pip\_vendor\resolvelib\resolvers.py”, line 172, in _add_to_criteria
if not criterion.candidates:
File “C:\Users\TT\Downloads\stable-diffusion-webui\venv\lib\site-packages\pip\_vendor\resolvelib\structs.py”, line 151, in __bool__
return bool(self._sequence)
File “C:\Users\TT\Downloads\stable-diffusion-webui\venv\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py”, line 155, in __bool__
return any(self)
File “C:\Users\TT\Downloads\stable-diffusion-webui\venv\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py”, line 143, in
return (c for c in iterator if id(c) not in self._incompatible_ids)
File “C:\Users\TT\Downloads\stable-diffusion-webui\venv\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py”, line 47, in _iter_built
candidate = func()
File “C:\Users\TT\Downloads\stable-diffusion-webui\venv\lib\site-packages\pip\_internal\resolution\resolvelib\factory.py”, line 206, in _make_candidate_from_link
self._link_candidate_cache[link] = LinkCandidate(
File “C:\Users\TT\Downloads\stable-diffusion-webui\venv\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py”, line 297, in __init__
super().__init__(
File “C:\Users\TT\Downloads\stable-diffusion-webui\venv\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py”, line 162, in __init__
self.dist = self._prepare()
File “C:\Users\TT\Downloads\stable-diffusion-webui\venv\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py”, line 231, in _prepare
dist = self._prepare_distribution()
File “C:\Users\TT\Downloads\stable-diffusion-webui\venv\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py”, line 308, in _prepare_distribution
return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
File “C:\Users\TT\Downloads\stable-diffusion-webui\venv\lib\site-packages\pip\_internal\operations\prepare.py”, line 438, in prepare_linked_requirement
return self._prepare_linked_requirement(req, parallel_builds)
File “C:\Users\TT\Downloads\stable-diffusion-webui\venv\lib\site-packages\pip\_internal\operations\prepare.py”, line 483, in _prepare_linked_requirement
local_file = unpack_url(
File “C:\Users\TT\Downloads\stable-diffusion-webui\venv\lib\site-packages\pip\_internal\operations\prepare.py”, line 165, in unpack_url
file = get_http_url(
File “C:\Users\TT\Downloads\stable-diffusion-webui\venv\lib\site-packages\pip\_internal\operations\prepare.py”, line 106, in get_http_url
from_path, content_type = download(link, temp_dir.path)
File “C:\Users\TT\Downloads\stable-diffusion-webui\venv\lib\site-packages\pip\_internal\network\download.py”, line 134, in __call__
resp = _http_get_download(self._session, link)
File “C:\Users\TT\Downloads\stable-diffusion-webui\venv\lib\site-packages\pip\_internal\network\download.py”, line 117, in _http_get_download
resp = session.get(target_url, headers=HEADERS, stream=True)
File “C:\Users\TT\Downloads\stable-diffusion-webui\venv\lib\site-packages\pip\_vendor\requests\sessions.py”, line 600, in get
return self.request(“GET”, url, **kwargs)
File “C:\Users\TT\Downloads\stable-diffusion-webui\venv\lib\site-packages\pip\_internal\network\session.py”, line 518, in request
return super().request(method, url, *args, **kwargs)
File “C:\Users\TT\Downloads\stable-diffusion-webui\venv\lib\site-packages\pip\_vendor\requests\sessions.py”, line 587, in request
resp = self.send(prep, **send_kwargs)
File “C:\Users\TT\Downloads\stable-diffusion-webui\venv\lib\site-packages\pip\_vendor\requests\sessions.py”, line 701, in send
r = adapter.send(request, **kwargs)
File “C:\Users\TT\Downloads\stable-diffusion-webui\venv\lib\site-packages\pip\_vendor\cachecontrol\adapter.py”, line 48, in send
cached_response = self.controller.cached_request(request)
File “C:\Users\TT\Downloads\stable-diffusion-webui\venv\lib\site-packages\pip\_vendor\cachecontrol\controller.py”, line 155, in cached_request
resp = self.serializer.loads(request, cache_data, body_file)
File “C:\Users\TT\Downloads\stable-diffusion-webui\venv\lib\site-packages\pip\_vendor\cachecontrol\serialize.py”, line 95, in loads
return getattr(self, “_loads_v{}”.format(ver))(request, data, body_file)
File “C:\Users\TT\Downloads\stable-diffusion-webui\venv\lib\site-packages\pip\_vendor\cachecontrol\serialize.py”, line 186, in _loads_v4
cached = msgpack.loads(data, raw=False)
File “C:\Users\TT\Downloads\stable-diffusion-webui\venv\lib\site-packages\pip\_vendor\msgpack\fallback.py”, line 123, in unpackb
unpacker.feed(packed)
File “C:\Users\TT\Downloads\stable-diffusion-webui\venv\lib\site-packages\pip\_vendor\msgpack\fallback.py”, line 381, in feed
self._buffer.extend(view)
MemoryError
[notice] A new release of pip available: 22.2.1 -> 22.3.1
[notice] To update, run: C:\Users\TT\Downloads\stable-diffusion-webui\venv\Scripts\python.exe -m pip install –upgrade pip
Traceback (most recent call last):
File “C:\Users\TT\Downloads\stable-diffusion-webui\launch.py”, line 324, in
prepare_environment()
File “C:\Users\TT\Downloads\stable-diffusion-webui\launch.py”, line 233, in prepare_environment
run(f'”{python}” -m {torch_command}’, “Installing torch and torchvision”, “Couldn’t install torch”, live=True)
File “C:\Users\TT\Downloads\stable-diffusion-webui\launch.py”, line 58, in run
raise RuntimeError(f”””{errdesc or ‘Error running command’}.
RuntimeError: Couldn’t install torch.
Command: “C:\Users\TT\Downloads\stable-diffusion-webui\venv\Scripts\python.exe” -m pip install torch==1.13.1+cu117 torchvision==0.14.1+cu117 –extra-index-url https://download.pytorch.org/whl/cu117
Error code: 2
Press any key to continue . . .
Yours seems to be an error in pip. It’s out of memory for some reason. How much RAM is there on your PC?
I haven’t tested it yet, but you can try downloading the zip file to see if that works for you.
https://github.com/AUTOMATIC1111/stable-diffusion-webui/releases/tag/v1.0.0-pre
It is supposed to work after unzip and run run.bat
I have tried several times to get this install working but xformers module persists not being found, I have tried solutions like adding –xformers or the force install command to the arg to no effect, I am running windows 10 LTSC 2021 and have the other 1 click install Stable Diffusion working fine.
Creating venv in directory E:\stable-diffusion-webui\venv using python “E:\stable-diffusion-ui\profile\AppData\Local\Programs\Python\Python310\python.exe”
venv “E:\stable-diffusion-webui\venv\Scripts\Python.exe”
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Commit hash:
Installing torch and torchvision
Installing gfpgan
Installing clip
Installing open_clip
Cloning Stable Diffusion into repositories\stable-diffusion-stability-ai…
Cloning Taming Transformers into repositories\taming-transformers…
Cloning K-diffusion into repositories\k-diffusion…
Cloning CodeFormer into repositories\CodeFormer…
Cloning BLIP into repositories\BLIP…
Installing requirements for CodeFormer
Installing requirements for Web UI
Launching Web UI with arguments:
No module ‘xformers’. Proceeding without it.
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
Calculating sha256 for E:\stable-diffusion-webui\models\Stable-diffusion\sd-v1-5.ckpt: e1441589a6f3c5a53f5f54d0975a18a7feb7cdf0b0dee276dfc3331ae376a053
Loading weights [e1441589a6] from E:\stable-diffusion-webui\models\Stable-diffusion\sd-v1-5.ckpt
Applying cross attention optimization (Doggettx).
Textual inversion embeddings loaded(0):
Model loaded in 9.6s (0.3s create model, 8.2s load weights).
Checkpoint sd-v1-5.ckpt [e1441589a6] not found; loading fallback sd-v1-5.ckpt [e1441589a6]
Running on local URL: http://127.0.0.1:7860
To create a public link, set `share=True` in `launch()`.
The xformers warning message displays whenever you don’t use xformers.
I don’t see your command line arguments, but you should be running webui-user.bat with argument –xformers to enable xformers. You should be able to verify you are really using it from the standard output. E.g., mine looks like
Python 3.10.7 (tags/v3.10.7:6cc6b13, Sep 5 2022, 14:08:36) [MSC v.1933 64 bit (AMD64)]
Commit hash: 5265918b4620b2049dfab53a0d43db3f0d4bfc0d
Installing requirements for Web UI
Launching Web UI with arguments: –listen –xformers –gradio-img2img-tool color-sketch –medvram
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
ok, so now i got here. i do have an nvida gpu
venv “C:\Users\щщ\stable-diffusion-webui\venv\Scripts\Python.exe”
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Commit hash: b165e341e70300f66c8a77b9383041f4147b24a8
Traceback (most recent call last):
File “C:\Users\щщ\stable-diffusion-webui\launch.py”, line 316, in
prepare_environment()
File “C:\Users\щщ\stable-diffusion-webui\launch.py”, line 228, in prepare_environment
run_python(“import torch; assert torch.cuda.is_available(), ‘Torch is not able to use GPU; add –skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check'”)
File “C:\Users\щщ\stable-diffusion-webui\launch.py”, line 89, in run_python
return run(f'”{python}” -c “{code}”‘, desc, errdesc)
File “C:\Users\щщ\stable-diffusion-webui\launch.py”, line 65, in run
raise RuntimeError(message)
RuntimeError: Error running command.
Command: “C:\Users\щщ\stable-diffusion-webui\venv\Scripts\python.exe” -c “import torch; assert torch.cuda.is_available(), ‘Torch is not able to use GPU; add –skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check'”
Error code: 1
stdout:
stderr: C:\Users\\stable-diffusion-webui\venv\lib\site-packages\torch\cuda\__init__.py:83: UserWarning: CUDA initialization: CUDA driver initialization failed, you might not have a CUDA gpu. (Triggered internally at ..\c10\cuda\CUDAFunctions.cpp:109.)
return torch._C._cuda_getDeviceCount() > 0
Traceback (most recent call last):
File “”, line 1, in
AssertionError: Torch is not able to use GPU; add –skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check
If you have an nvidia GPU, it could be that had cpu version of pytorch installed previously. You can try uninstalling ALL pythons from your systems, delete the webui folder and restart the install process.
hi. what i actually did is downloaded phyton after getting other steps done cause i thought i should have had it already. maybe this affects
Creating venv in directory C:\Users\щщ\stable-diffusion-webui\venv using python “C:\Users\∙∙\AppData\Local\Programs\Python\Python310\python.exe”
Unable to create venv in directory “C:\Users\щщ\stable-diffusion-webui\venv”
exit code: 3
stderr:
The error message didn’t say what’s wrong. You can delete the webui folder and start from the git clone she.
this does not work for amd cards, couldve said that at the beginning of the guide…
My apologies. Will add.
what do i do
venv “C:\Users\meanm\stable-diffusion-webui\venv\Scripts\Python.exe”
Python 3.10.9 (tags/v3.10.9:1dd9be6, Dec 6 2022, 20:01:21) [MSC v.1934 64 bit (AMD64)]
Commit hash: ff6a5bcec1ce25aa8f08b157ea957d764be23d8d
Installing torch and torchvision
Traceback (most recent call last):
File “C:\Users\meanm\stable-diffusion-webui\launch.py”, line 307, in
prepare_environment()
File “C:\Users\meanm\stable-diffusion-webui\launch.py”, line 218, in prepare_environment
run(f'”{python}” -m {torch_command}’, “Installing torch and torchvision”, “Couldn’t install torch”)
File “C:\Users\meanm\stable-diffusion-webui\launch.py”, line 64, in run
raise RuntimeError(message)
RuntimeError: Couldn’t install torch.
Command: “C:\Users\meanm\stable-diffusion-webui\venv\Scripts\python.exe” -m pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 –extra-index-url https://download.pytorch.org/whl/cu113
Error code: 1
stdout:
stderr: C:\Users\meanm\stable-diffusion-webui\venv\Scripts\python.exe: No module named pip
Try
C:\Users\meanm\stable-diffusion-webui\venv\Scripts\python.exe -m ensurepip –upgrade
it said it cant run on my pc does this only work on nvidia gpu, i have a cpu integrated gpu
Yes you will need a discrete graphic card for this. You can always use Google Colab. There’s a Colab notebook available in the Quick Start Guide.
https://andrewongai.gumroad.com/l/stable_diffusion_quick_start
What do i do
venv “C:\Users\pc\stable-diffusion-webui\venv\Scripts\Python.exe”
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Commit hash: 82725f0ac439f7e3b67858d55900e95330bbd326
Traceback (most recent call last):
File “C:\Users\pc\stable-diffusion-webui\launch.py”, line 307, in
prepare_environment()
File “C:\Users\pc\stable-diffusion-webui\launch.py”, line 221, in prepare_environment
run_python(“import torch; assert torch.cuda.is_available(), ‘Torch is not able to use GPU; add –skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check'”)
File “C:\Users\pc\stable-diffusion-webui\launch.py”, line 88, in run_python
return run(f'”{python}” -c “{code}”‘, desc, errdesc)
File “C:\Users\pc\stable-diffusion-webui\launch.py”, line 64, in run
raise RuntimeError(message)
RuntimeError: Error running command.
Command: “C:\Users\pc\stable-diffusion-webui\venv\Scripts\python.exe” -c “import torch; assert torch.cuda.is_available(), ‘Torch is not able to use GPU; add –skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check'”
Error code: 1
stdout:
stderr: Traceback (most recent call last):
File “”, line 1, in
AssertionError: Torch is not able to use GPU; add –skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check
Do you have a nvdia GPU?
Thank you, Andrew, running it on python 3.10 indeed solved my issue (had to adapt venv.cfg to stop looking for 3.11, and then all was wonderful). Thanks for the guide and the help!
Have installed the latest python version, now it seems torch won’t install, saying
Could not find a version that satisfies the requirement torch==1.12.1+cu113 (from versions: none)
ERROR: No matching distribution found for torch==1.12.1+cu113
The web suggests downgrading python to an old version for which there is no more installer. Or is 1.12.1 no longer the right version of torch?
Don’t use the latest python. Follow the python section in the guide and use 3.10
Thanks for the excellent guide. It worked perfectly and I was able to launch Automatic1111. Then I closed everything to add the –xformer line you mentioned. Now I get a wall of error messages when it tries to launch (see below). I removed the –xformer line and it still comes up with the error.
Any suggestions?
Error messages:
File “C:\Users\xxxx\Documents\A1111 Web UI Autoinstaller\stable-diffusion-webui\launch.py”, line 307, in start()
File “C:\Users\xxxx\Documents\A1111 Web UI Autoinstaller\stable-diffusion-webui\launch.py”, line 298, in start import webui
File “C:\Users\xxxx\Documents\A1111 Web UI Autoinstaller\stable-diffusion-webui\webui.py”, line 13, in from modules.call_queue import wrap_queued_call, queue_lock, wrap_gradio_gpu_call
File “C:\Users\xxxxx\Documents\A1111 Web UI Autoinstaller\stable-diffusion-webui\modules\call_queue.py”, line 7, in from modules import shared
File “C:\Users\xxxx\Documents\A1111 Web UI Autoinstaller\stable-diffusion-webui\modules\shared.py”, line 243, in prompt_styles = modules.styles.StyleDatabase(styles_filename)
File “C:\Users\xxxx\Documents\A1111 Web UI Autoinstaller\stable-diffusion-webui\modules\styles.py”, line 50, in __init__ for row in reader:
File “C:\Users\xxxx\AppData\Local\Programs\Python\Python310\lib\csv.py”, line 110, in __next__ self.fieldnames
File “C:\Users\xxxx\AppData\Local\Programs\Python\Python310\lib\csv.py”, line 97, in fieldnames self._fieldnames = next(self.reader)
File “C:\Users\xxxx\AppData\Local\Programs\Python\Python310\lib\codecs.py”, line 322, in decode(result, consumed) = self._buffer_decode(data, self.errors, final)
File “C:\Users\xxxx\AppData\Local\Programs\Python\Python310\lib\encodings\utf_8_sig.py”, line 69, in _buffer_decode return codecs.utf_8_decode(input, errors, final)
UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0x92 in position 2067: invalid start byte
The error doesn’t seem to be be related to the –xformers argument. I think the csv file that stores keywords related to artists names is corrupted. If you are familiar with git, you can run the following command under the stable-diffusion-webui directory
git checkout -f
If not, you can delete the webui folder and start over.
Thanks … that seems to have worked.
I never would have figured that out 🙂
When I double click on webui-user.bat it returns me this error. I tried running this several times:
Python 3.11.1 (tags/v3.11.1:a7a450f, Dec 6 2022, 19:58:39) [MSC v.1934 64 bit (AMD64)]
Commit hash: 874b975bf8438b2b5ee6d8540d63b2e2da6b8dbd
Installing torch and torchvision
Traceback (most recent call last):
File “C:\Users\USERNAME\stable-diffusion-webui\launch.py”, line 306, in
prepare_environment()
File “C:\Users\USERNAME\stable-diffusion-webui\launch.py”, line 218, in prepare_environment
run(f'”{python}” -m {torch_command}’, “Installing torch and torchvision”, “Couldn’t install torch”)
File “C:\Users\USERNAME\stable-diffusion-webui\launch.py”, line 64, in run
raise RuntimeError(message)
RuntimeError: Couldn’t install torch.
Command: “C:\Users\USERNAME\stable-diffusion-webui\venv\Scripts\python.exe” -m pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 –extra-index-url https://download.pytorch.org/whl/cu113
Error code: 1
stdout: Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cu113
stderr: ERROR: Could not find a version that satisfies the requirement torch==1.12.1+cu113 (from versions: none)
ERROR: No matching distribution found for torch==1.12.1+cu113
Hi Jason, you are using Python 3.11. You need 3.10. You will need to uninstall 3.11 and any other versions. And then install 3.10.
when I double click on webui-user.bat it returns me this error:
Remainder of file ignored
Traceback (most recent call last):
File “C:\Users\user_name\anaconda3\lib\runpy.py”, line 15, in
import importlib.util
File “C:\Users\user_name\anaconda3\lib\importlib\util.py”, line 2, in
from . import abc
ImportError: cannot import name ‘abc’ from ‘importlib’ (C:\Users\emret\anaconda3\lib\importlib\__init__.py)
Launch unsuccessful. Exiting.
There was a problem with AUTOMATIC1111’s repository on github. Try again to see if it works.
my cmd says: ‘git’ is not recognized as an internal or external command, operable program or batch file
Have you installed git? You may need to restart cmd after.