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 #15827

Open
2 of 6 tasks
gabikreal1 opened this issue May 17, 2024 · 3 comments
Open
2 of 6 tasks

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

gabikreal1 opened this issue May 17, 2024 · 3 comments
Labels
bug-report Report of a bug, yet to be confirmed

Comments

@gabikreal1
Copy link

gabikreal1 commented May 17, 2024

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?

RuntimeError: Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check

I've reinstalled VENV it didn't help

Steps to reproduce the problem

Installed the Automatic WebUI. and it just showed this problem.
By the documentation I've been instructed to post the enviroment. I've attached it in system info.

What should have happened?

The webUI should've started

What browsers do you use to access the UI ?

Google Chrome

Sysinfo

python -m torch.utils.collect_env

Output@

PyTorch version: 2.1.2+cu121
Is debug build: False
CUDA used to build PyTorch: 12.1
ROCM used to build PyTorch: N/A

OS: Microsoft Windows 11 Home
GCC version: Could not collect
Clang version: Could not collect
CMake version: Could not collect
Libc version: N/A

Python version: 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)] (64-bit runtime)
Python platform: Windows-10-10.0.22631-SP0
Is CUDA available: False
CUDA runtime version: Could not collect
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: GPU 0: NVIDIA GeForce RTX 3050 Laptop GPU
Nvidia driver version: 511.69
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

CPU:
Architecture=9
CurrentClockSpeed=3201
DeviceID=CPU0
Family=107
L2CacheSize=4096
L2CacheSpeed=
Manufacturer=AuthenticAMD
MaxClockSpeed=3201
Name=AMD Ryzen 7 5800H with Radeon Graphics
ProcessorType=3
Revision=20480

Versions of relevant libraries:
[pip3] numpy==1.26.4
[pip3] torch==2.1.2+cu121
[pip3] torchvision==0.16.2+cu121
[conda] Could not collect

Console logs

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

@gabikreal1 gabikreal1 added the bug-report Report of a bug, yet to be confirmed label May 17, 2024
@gabikreal1 gabikreal1 changed the title [Bug]: [Bug]: Torch is not able to use GPU May 17, 2024
@b-fission
Copy link

You should update your nvidia graphics driver.
The log says your driver version is 511.69, which is too old for CUDA 12.1

Go here: https://www.nvidia.com/download/index.aspx?lang=en-us

@IblisBane
Copy link

IblisBane commented May 19, 2024

Happened to me this morning on an install that has been running fine for months. Updated extensions, (I think adetailer and controlnet updated), and when I re-launched the webui, got the same error. (Edit: Rolling back the extensions and disabling the extensions did not help.)

Updated Nvidia driver and CUDA, still got the same error.

What worked for me was re-installing Torch, (added --reinstall-torch to COMMANDLINE_ARGS in webui-user.bat), and re-running it. (Downloaded the latest Torch (about 2.5GB).)

(Remember to remove that parameter before you run it again or it'll install every time.)

(It did throw an error about Xformers, but I'm using --opt-sdp-attention instead and it didn't seem to affect anything.)

Hope that helps (somebody). :D

@niony
Copy link

niony commented May 21, 2024

No xformers fit for torch-2.1.2+cu121. When u pip install any version xformers , the torch-2.1.2+cu121 will be uninstall automatically and install torch-2.1 or 2.3 automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-report Report of a bug, yet to be confirmed
Projects
None yet
Development

No branches or pull requests

4 participants