lshqqytiger / stable-diffusion-webui-amdgpu

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

[Bug]: torch-directml #268

Closed sorrrl closed 7 months ago

sorrrl commented 1 year ago

Is there an existing issue for this?

What happened?

NOT INSTALLING

Steps to reproduce the problem

  1. Go to ....
  2. Press ....
  3. ...

What should have happened?

ERROR: Could not find a version that satisfies the requirement torch-directml (from versions: none) ERROR: No matching distribution found for torch-directml

Sysinfo

-

What browsers do you use to access the UI ?

No response

Console logs

Creating venv in directory C:\Users\User\Desktop\stable-diffusion-webui-directml-master\venv using python "C:\Program Files\Python311\python.exe"
venv "C:\Users\User\Desktop\stable-diffusion-webui-directml-master\venv\Scripts\Python.exe"
==============================================================================================================
INCOMPATIBLE PYTHON VERSION

This program is tested with 3.10.6 Python, but you have 3.11.5.
If you encounter an error with "RuntimeError: Couldn't install torch." message,
or any other error regarding unsuccessful package (library) installation,
please downgrade (or upgrade) to the latest version of 3.10 Python
and delete current Python and "venv" folder in WebUI's directory.

You can download 3.10 Python from here: https://www.python.org/downloads/release/python-3106/

Alternatively, use a binary release of WebUI: https://github.com/AUTOMATIC1111/stable-diffusion-webui/releases

Use --skip-python-version-check to suppress this warning.
==============================================================================================================
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
Python 3.11.5 (tags/v3.11.5:cce6ba9, Aug 24 2023, 14:38:34) [MSC v.1936 64 bit (AMD64)]
Version: 1.6.0
Commit hash: <none>
Installing torch and torchvision
Collecting torch==2.0.0
  Using cached torch-2.0.0-cp311-cp311-win_amd64.whl (172.3 MB)
Collecting torchvision==0.15.1
  Using cached torchvision-0.15.1-cp311-cp311-win_amd64.whl (1.2 MB)
ERROR: Could not find a version that satisfies the requirement torch-directml (from versions: none)
ERROR: No matching distribution found for torch-directml
Traceback (most recent call last):
  File "C:\Users\User\Desktop\stable-diffusion-webui-directml-master\launch.py", line 48, in <module>
    main()
  File "C:\Users\User\Desktop\stable-diffusion-webui-directml-master\launch.py", line 39, in main
    prepare_environment()
  File "C:\Users\User\Desktop\stable-diffusion-webui-directml-master\modules\launch_utils.py", line 378, in prepare_environment
    run(f'"{python}" -m {torch_command}', "Installing torch and torchvision", "Couldn't install torch", live=True)
  File "C:\Users\User\Desktop\stable-diffusion-webui-directml-master\modules\launch_utils.py", line 116, in run
    raise RuntimeError("\n".join(error_bits))
RuntimeError: Couldn't install torch.
Command: "C:\Users\User\Desktop\stable-diffusion-webui-directml-master\venv\Scripts\python.exe" -m pip install torch==2.0.0 torchvision==0.15.1 torch-directml
Error code: 1

Additional information

Command: "C:\Users\User\Desktop\stable-diffusion-webui-directml-master\venv\Scripts\python.exe" -m pip install torch==2.0.0 torchvision==0.15.1 torch-directml trying installing this C:\Users\User>"C:\Users\User\Desktop\stable-diffusion-webui-directml-master\venv\Scripts\python.exe" -m pip install torch==2.0.0 torchvision==0.15.1 torch-directml Collecting torch==2.0.0 Using cached torch-2.0.0-cp311-cp311-win_amd64.whl (172.3 MB) Collecting torchvision==0.15.1 Using cached torchvision-0.15.1-cp311-cp311-win_amd64.whl (1.2 MB) ERROR: Could not find a version that satisfies the requirement torch-directml (from versions: none) ERROR: No matching distribution found for torch-directml

lshqqytiger commented 1 year ago

Python 3.11.x is not supported. Use Python 3.10.x

shott92 commented 11 months ago

Thanks for this great port to enable Stable Diffusion on AMD and Windows. Are there any plans to support 3.11 or greater in the future?

lshqqytiger commented 11 months ago

I don't know. I'm not a maintainer of DirectML or torch-directml. https://github.com/microsoft/DirectML/issues/473

Donased commented 9 months ago

Python 3.11.x is not supported. Use Python 3.10.x

Just a quick thank you. Solved my issue.