无法安装稳定扩散,出现此错误

问题描述 投票:0回答:1
venv "C:\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)]
Version: v1.9.3
Commit hash: <hash>
Installing torch and torchvision
C:\sd\stable-diffusion-webui\venv\Scripts\python.exe: No module named pip
Traceback (most recent call last):
  File "C:\sd\stable-diffusion-webui\launch.py", line 48, in <module>
    main()
  File "C:\sd\stable-diffusion-webui\launch.py", line 39, in main
    prepare_environment()
  File "C:\sd\stable-diffusion-webui\modules\launch_utils.py", line 380, in prepare_environment
    run(f'"{python}" -m {torch_command}', "Installing torch and torchvision", "Couldn't install torch", live=True)
  File "C:\sd\stable-diffusion-webui\modules\launch_utils.py", line 115, in run
    raise RuntimeError("\n".join(error_bits))
RuntimeError: Couldn't install torch.
Command: "C:\sd\stable-diffusion-webui\venv\Scripts\python.exe" -m pip install torch==2.1.2 torchvision==0.16.2 --extra-index-url https://download.pytorch.org/whl/cu121
Error code: 1
Press any key to continue . . .

我已经尝试安装所有必需的东西并将其添加到环境变量中,但仍然没有得到解决方案。

python pytorch pip torchvision stable-diffusion
1个回答
0
投票

我不太确定,但可能会有所帮助, 请尝试在requirements.txt中将pytorch和torchvision的版本从2.1.2更改为2.2.1,将0.16.2更改为0.17.0,然后重试,祝你好运

© www.soinside.com 2019 - 2024. All rights reserved.