Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Torch is not able to use GPU #571

Open
1 of 6 tasks
gendalv opened this issue Jan 2, 2025 · 3 comments
Open
1 of 6 tasks

[Bug]: Torch is not able to use GPU #571

gendalv opened this issue Jan 2, 2025 · 3 comments

Comments

@gendalv
Copy link

gendalv commented Jan 2, 2025

Checklist

  • The issue exists after disabling all extensions
  • The issue exists on a clean installation of webui
  • The issue is caused by an extension, but I believe it is caused by a bug in the webui
  • The issue exists in the current version of the webui
  • The issue has not been reported before recently
  • The issue has been reported before but has not been fixed yet

What happened?

I've managed to install original AUTOMATIC1111 ~3 years ago and it's still working, because magic, but it doesn't have sdxl support (models aren't loading), so I'm trying to upgrade.

I've tried github/SD portable, but I'm getting the same message, if I add the recommended in the message command to the webui-user.bat - it launches, but it doesn't load any models, including the older SD1.5 based.

So I'm trying this now, since it's supposed to be AMD-specific.

I'm not using command line or .sh files

Steps to reproduce the problem

download stable-diffusion-webui-amdgpu-1.10.0-amd.zip
run webui-user.bat
run again webui-user.bat get stuck on that message

What should have happened?

happiness

What browsers do you use to access the UI ?

No response

Sysinfo

same as in the version that works:
windows 11
6600xt + 12gen intel + 32gb
Python 3.10.6, Git portable

Console logs

'core' is not recognized as an internal or external command,
operable program or batch file.
'core' is not recognized as an internal or external command,
operable program or batch file.
'core' is not recognized as an internal or external command,
operable program or batch file.
'core' is not recognized as an internal or external command,
operable program or batch file.
'core' is not recognized as an internal or external command,
operable program or batch file.
'core' is not recognized as an internal or external command,
operable program or batch file.
'core' is not recognized as an internal or external command,
operable program or batch file.
'core' is not recognized as an internal or external command,
operable program or batch file.
venv "D:\Stable Diffusion AMDgpu\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: 1.10.0
Commit hash: <none>
Traceback (most recent call last):
  File "D:\Stable Diffusion AMDgpu\launch.py", line 48, in <module>
    main()
  File "D:\Stable Diffusion AMDgpu\launch.py", line 39, in main
    prepare_environment()
  File "D:\Stable Diffusion AMDgpu\modules\launch_utils.py", line 587, in prepare_environment
    raise RuntimeError(
RuntimeError: Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check

Additional information

No response

@lshqqytiger
Copy link
Owner

I strongly recommend using Git, not a portable one.
We now need a command line argument for AMDGPUs. You can add it on webui-user.bat like what you did. There's two options.
--use-directml: this is what you've run for now.
--use-zluda: may be faster and more efficient on RX 6000/7000 series than DirectML. depends on AMD HIP SDK.
Add one of them and launch webui with fresh venv. (just wipe venv folder and run)

@gendalv
Copy link
Author

gendalv commented Jan 5, 2025

@echo off

set PYTHON=
set GIT=
set VENV_DIR=
set COMMANDLINE_ARGS=--use-zluda

call webui.bat

not fixed

'core' is not recognized as an internal or external command,
operable program or batch file.
'core' is not recognized as an internal or external command,
operable program or batch file.
'core' is not recognized as an internal or external command,
operable program or batch file.
'core' is not recognized as an internal or external command,
operable program or batch file.
'core' is not recognized as an internal or external command,
operable program or batch file.
'core' is not recognized as an internal or external command,
operable program or batch file.
'core' is not recognized as an internal or external command,
operable program or batch file.
'core' is not recognized as an internal or external command,
operable program or batch file.
venv "D:\*\venv\Scripts\Python.exe"
WARNING: ZLUDA works best with SD.Next. Please consider migrating to SD.Next.
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Version: 1.10.0
Commit hash: <none>
Traceback (most recent call last):
  File "D:\*\launch.py", line 48, in <module>
    main()
  File "D:\*\launch.py", line 39, in main
    prepare_environment()
  File "D:\*\modules\launch_utils.py", line 566, in prepare_environment
    from modules import zluda_installer
  File "D:\*\modules\zluda_installer.py", line 14, in <module>
    HIPSDK_TARGETS = ['rocblas.dll', 'rocsolver.dll', f'hiprtc{"".join([v.zfill(2) for v in rocm.version.split(".")])}.dll']
AttributeError: 'NoneType' object has no attribute 'split'

@CS1o
Copy link

CS1o commented Jan 15, 2025

Checkout my Install Guide on how to make it work with ZLUDA:
https://github.com/CS1o/Stable-Diffusion-Info/wiki/Webui-Installation-Guides
its the Automatic1111 with Zluda Guide.

If you get any error please provide a full cmd log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants