AUTOMATIC1111 / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
140.63k stars 26.61k forks source link

[Bug]: Couldn't get torch to install #3702

Closed zikcai closed 1 year ago

zikcai commented 1 year ago

Is there an existing issue for this?

What happened?

Couldn't get torch to install, checked the dependencies doc and I think do should have everything needed.

venv "E:\NovelAI\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: f53ca516385cddf07c4429720e6bd373547e9112 Installing torch and torchvision Traceback (most recent call last): File "E:\NovelAI\stable-diffusion-webui\launch.py", line 205, in prepare_enviroment() File "E:\NovelAI\stable-diffusion-webui\launch.py", line 148, in prepare_enviroment run(f'"{python}" -m {torch_command}', "Installing torch and torchvision", "Couldn't install torch") File "E:\NovelAI\stable-diffusion-webui\launch.py", line 33, in run raise RuntimeError(message) RuntimeError: Couldn't install torch. Command: "E:\NovelAI\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

Press any key to continue . . .

OS: Windows 10 21H2 Browser: Chrome Capture

Steps to reproduce the problem

  1. Go to stable-diffusion-webui
  2. Launch webui-user.bat
  3. Wait for torch install
  4. Encounter Error

What should have happened?

Torch should be installed, then proceed to the next step

Commit where the problem happens

f53ca516385cddf07c4429720e6bd373547e9112

What platforms do you use to access UI ?

Windows

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

No response

Additional information, context and logs

No response

zikcai commented 1 year ago

Just got a tip from a friend that I am using the wrong python version, that might be the solution