Torch/Pytorch Install Error (FIX!) #5930
DrUmranAli
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
So I've been trying to figure out how to get this work..
Make sure to click use path in setup when installing python(3.10 is needed for xformers?)
Download, install and run your SD auto1111...if it crashed with pytorch/torch error move on below.(close the window)
This is where on installing torch and pytorch it often errors for people as it's trying and failing to download and install those files.
Go to https://download.pytorch.org/whl/cu113/torch/ and download the following two files:
torch-1.12.1+cu113-cp310-cp310-win_amd64.whl
torchvision-0.13.1+cu113-cp310-cp310-win_amd64.whl
Place these in your newly created venv folder inside the scripts folder
i.e c:\stablediffusion\venv\Scripts
then type this
c:\stablediffusion\venv\Scripts\activate
This is really important is it activate the virtual environment and will install to the SD venv folder and not anywhere else!
You'll see the prompt change to (this means it's working)
(venv) c:\stablediffusion\venv\Scripts
Lets upgrade pip with the next command:
python.exe -m pip install --upgrade pip
you'll see some text and then
Successfully installed pip-22.3.1
Now we install the torch and pytorch packages, enter the following commands one at a time, wait as it can take a while.
pip install torch-1.12.1+cu113-cp310-cp310-win_amd64.whl
pip install torchvision-0.13.1+cu113-cp310-cp310-win_amd64.whl
It will then finish,
Go back and run webui-user.bat in the main SD folder(ps edit the following line to install xformers) save, then run
set COMMANDLINE_ARGS= --xformers
It should start installing then rest of the reqs/then load up SD, worked and tested after days of errors!
Hope that helps someone!
Beta Was this translation helpful? Give feedback.
All reactions