Skip to content

[Bug]: Torch is not able to use GPU during install #17391

@Stulpnagel

Description

@Stulpnagel

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?

When I installed sd using "Windows (method 1)" (cf. https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Install-and-Run-on-NVidia-GPUs), processing to "run.bat" step, I encountered this bug. Console log is posted in "Console logs" part (note: all preceeding processes omitted).

Anyway the installation couldn't be continued successfully due to this interruption.

Steps to reproduce the problem

N/A

What should have happened?

N/A

What browsers do you use to access the UI ?

No response

Sysinfo

(I can't launch UI at all. For sysinfo, see attached file in "Additional information")

Console logs

Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Version: v1.10.1
Commit hash: 82a973c04367123ae98bd9abdf80d9eda9b910e2
D:\soft\sd.webui\system\python\python.exe -c "import torch; assert torch.cuda.is_available()"
Traceback (most recent call last):
  File "D:\soft\sd.webui\webui\launch.py", line 48, in <module>
    main()
  File "D:\soft\sd.webui\webui\launch.py", line 39, in main
    prepare_environment()
  File "D:\soft\sd.webui\webui\modules\launch_utils.py", line 388, 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

According to the guide in https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Troubleshooting, I could exclude GPU (& drive) issues, so I ran python -m torch.utils.collect_env in console, and the output infos posted in the file below

env.txt

(there is no dir named venv so I just opened the console under root dir D:\soft\sd.webui\webui ).

I think the issue is actually on PyTorch, see "PyTorch version: 2.11.0+cpu" in the file above. Shouldn't it be some like GPU version? Why did run.bat automatically install a cpu-version PyTorch?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug-reportReport of a bug, yet to be confirmed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions