Spaces:
Running
on
CPU Upgrade
Problem with Torchlight when installing stable diffision 1.5
So, I had Stable Diffusion 1.4 working on my computer with Automatic1111, but then I deleted everything and tried reinstalling it with Stable Diffusion 1.5. I keep getting the error message pasted below when trying to start it up. I have tried reinstalling everything that I know how including python, git for windows, Automatic1111 web-ui, and Anaconda as well as Miniconda. Any help would be appreciated.
C:\ai\stable-diffusion-webui>git pull
Already up to date.
C:\ai\stable-diffusion-webui>pause
Press any key to continue . . .
venv "C:\ai\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.11.0 (main, Oct 24 2022, 18:26:48) [MSC v.1933 64 bit (AMD64)]
Commit hash: 828438b4a190759807f9054932cae3a8b880ddf1
Installing torch and torchvision
Traceback (most recent call last):
File "C:\ai\stable-diffusion-webui\launch.py", line 250, in
prepare_enviroment()
File "C:\ai\stable-diffusion-webui\launch.py", line 171, in prepare_enviroment
run(f'"{python}" -m {torch_command}', "Installing torch and torchvision", "Couldn't install torch")
File "C:\ai\stable-diffusion-webui\launch.py", line 34, in run
raise RuntimeError(message)
RuntimeError: Couldn't install torch.
Command: "C:\ai\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
[notice] A new release of pip available: 22.3 -> 22.3.1
[notice] To update, run: C:\ai\stable-diffusion-webui\venv\Scripts\python.exe -m pip install --upgrade pip
Press any key to continue . . .
So I think I got it working. Evidently, I had installed the wrong version of Python. I installed Python 3.11.0. But you can only use Python 3.10.6 at this time. I hope this helps someone else who has committed my sin.
NVM, after uninstalling and reinstalling, it worked, no idea what i did wrong the first time.
If anyone tried all the options and still can't fix it yet, try this: after uninstalling python there are still some files at users/yourusername/AppData. I installed and uninstalled for like 6-7 times with all different options like trying a different HDD, different root name etc. and still gave "Couldn't install torch" error. I don't know how, but it worked for me when I deleted all Python and pip files at AppData and then tried a clean installation of Python and Stable Diffusion WebUI. Good luck.
I had installed both 3.10 and 3.11. After unstalling 3.11 it worked.
I uninstalled 3.10 and installed 3.6 from the recommendation link and still get the same error :(