stable-diffusion-webui icon indicating copy to clipboard operation
stable-diffusion-webui copied to clipboard

cant install torch

Open AIexxander opened this issue 2 years ago • 4 comments

venv "C:\Git\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 Traceback (most recent call last): File "C:\Git\stable-diffusion-webui\launch.py", line 164, in prepare_enviroment() File "C:\Git\stable-diffusion-webui\launch.py", line 117, in prepare_enviroment run(f'"{python}" -m {torch_command}', "Installing torch and torchvision", "Couldn't install torch") File "C:\Git\stable-diffusion-webui\launch.py", line 32, in run raise RuntimeError(message) RuntimeError: Couldn't install torch. Command: "C:\Git\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 Collecting torch==1.12.1+cu113 Downloading https://download.pytorch.org/whl/cu113/torch-1.12.1%2Bcu113-cp310-cp310-win_amd64.whl (2143.8 MB) ---- 0.2/2.1 GB 36.4 MB/s eta 0:00:53

stderr: ERROR: Wheel 'torch' located at C:\Users\Gamer\AppData\Local\Temp\pip-unpack-r5mwj0vq\torch-1.12.1+cu113-cp310-cp310-win_amd64.whl is invalid.

[notice] A new release of pip available: 22.2.1 -> 22.2.2 [notice] To update, run: C:\Git\stable-diffusion-webui\venv\Scripts\python.exe -m pip install --upgrade pip

AIexxander avatar Oct 10 '22 08:10 AIexxander

I have the same issue

mrtknrt avatar Oct 26 '22 08:10 mrtknrt

downgrade phyton to 3.0.6 or lower OR wait until the gui is 3.11 ready

Serasul1984 avatar Nov 04 '22 19:11 Serasul1984

I had the same issue. downloaded necessary torch whl file from https://download.pytorch.org/whl/cu113/torch/ pip downloaded whl locally.

knol-orchid avatar Nov 19 '22 15:11 knol-orchid

I know nothing about any of this stuff, but I got it to work by uninstalling Python 3.11 and installing 3.10.8. You might need to delete the venv folder too.

BevansDesign avatar Nov 26 '22 07:11 BevansDesign