lshqqytiger / stable-diffusion-webui-amdgpu

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

[Bug]: 1.10.0 [3db66a0] rocm.py returns wrong rocm.version when HIP6.1.2 installed on win10 #500

Closed githubcto closed 3 months ago

githubcto commented 3 months ago

Checklist

What happened?

Windows10 installed HIP6.1.2, previous version 1.9.3-AMD works fine using --use-zluda. Thanks. However, v1.10.1-amd-1-g3db66a0b installation failed.

webui-user.bat with --use-zluda, zluda_installer.py detect HIP SDK version using rocm.py.

If %HIP_PATH%bin is configured at win10, rocm.py 27 hip_path = shutil.which("hipconfig") This hip_path = C:\Program Files\AMD\ROCm\6.1\bin\hipconfig.BAT and then 29 return dirname(resolve_link(hip_path), 2) returns C:\Program Files\AMD\ROCm\6.1. finally, rocm.version become 6.1, Good.

However, if %HIP_PATH%bin is NOT configured, 31 hip_path = os.environ.get("HIP_PATH", None) 33 return hip_path os.environ returns C:\Program Files\AMD\ROCm\6.1\ and rocm.version become "", installation failed.

Workaround: 33 return dirname(resolve_link(hip_path), 1) returns C:\Program Files\AMD\ROCm\6.1 instead of return C:\Program Files\AMD\ROCm\6.1\ . rocm.version become 6.1, Good.

I can not remember HIP5.7.1's os.environ.

Steps to reproduce the problem

  1. HIP 6.1.2 installed, but %HIP_PATH%bin is NOT configured at windows10,
  2. git clone https://github.com/lshqqytiger/stable-diffusion-webui-directml.git
  3. webui-user.bat --use-zluda

What should have happened?

normal boot with ZLUDA, like a previous version 1.9.3-AMD

What browsers do you use to access the UI ?

Microsoft Edge

Sysinfo

-

Console logs

...
ROCm Toolkit  was found.
...
Failed to install ZLUDA: Unsupported HIP SDK version:
Using CPU-only torch
...
Stable diffusion model failed to load

Additional information

SD.Next's dev looks same issue. https://github.com/vladmandic/automatic/blob/dev/modules/rocm.py

EygenCat commented 3 months ago

I tried to install with HIP6.1.2, when installing this came up

CWindowssystem32cmd.exe.txt

Getting "--dump-sysinfo" does not work, As well as launching WEBUI

lshqqytiger commented 3 months ago

You shouldn't use old ROCmLibs that is built with HIP SDK 5.7 on 6.1.