comfyanonymous / ComfyUI

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface.
https://www.comfy.org/
GNU General Public License v3.0
52.47k stars 5.54k forks source link

RuntimeError: Found no NVIDIA driver on your system. (AMD Linux, was working minutes ago) #5122

Open realsetvin opened 5 days ago

realsetvin commented 5 days ago

Expected Behavior

using amd on linux, was working just fine minutes ago

Actual Behavior

after following a guide to install something needed for another product on linux, I can no longer run comfyui. I have tried to redownload, ext. Searched fruitlessly everywhere. Really need help to resolve this extremely frustrating issue.

Steps to Reproduce

Issue occurred directly after following the linux version of this guide https://huggingface.co/docs/bitsandbytes/main/en/installation#multi-backend

Debug Logs

TORCH_BLAS_PREFER_HIPBLASLT=0 python /ComfyUI/main.py
Traceback (most recent call last):
  File "/ComfyUI/main.py", line 90, in <module>
    import execution
  File "/ComfyUI/execution.py", line 13, in <module>
    import nodes
  File "/ComfyUI/nodes.py", line 21, in <module>
    import comfy.diffusers_load
  File "/ComfyUI/comfy/diffusers_load.py", line 3, in <module>
    import comfy.sd
  File "/ComfyUI/comfy/sd.py", line 5, in <module>
    from comfy import model_management
  File "/ComfyUI/comfy/model_management.py", line 143, in <module>
    total_vram = get_total_memory(get_torch_device()) / (1024 * 1024)
  File "/ComfyUI/comfy/model_management.py", line 112, in get_torch_device
    return torch.device(torch.cuda.current_device())
  File "/usr/local/lib/python3.10/dist-packages/torch/cuda/__init__.py", line 942, in current_device
    _lazy_init()
  File "/usr/local/lib/python3.10/dist-packages/torch/cuda/__init__.py", line 319, in _lazy_init
    torch._C._cuda_init()
RuntimeError: Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and installed a driver from http://www.nvidia.com/Download/index.aspx

Other

No response

myke11j commented 4 days ago

NVIDIA CUDA is required to run pytorch which is needed for Comfy UI. CUDA technology is exclusive to NVIDIA, and it's not directly compatible with AMD GPU.

Run this command to make sure nvidia-smi

For AMD, there are are ways to use NVIDIA on your linux machine though, but I've never tried it but you can find some guides on it online

koskoakos commented 2 days ago

Probably installation of bitsandbytes installed non-rocm pytorch. Can you run the following commands to verify that?

rocminfo

pip show torch

python -c "import torch; print(torch.version.hip)"

realsetvin commented 1 day ago

NVIDIA CUDA is required to run pytorch which is needed for Comfy UI. CUDA technology is exclusive to NVIDIA, and it's not directly compatible with AMD GPU.

Run this command to make sure nvidia-smi

For AMD, there are are ways to use NVIDIA on your linux machine though, but I've never tried it but you can find some guides on it online

as stated, it was working.

I was able to get it working again after following the debug steps in the readme instructions to reinstall pytorch on linux.

Theres probably 100 gigs of data floating around from the various installs I have made, but I figure its better to leave things alone if they are working.

realsetvin commented 1 day ago

Probably installation of bitsandbytes installed non-rocm pytorch. Can you run the following commands to verify that?

rocminfo

pip show torch

python -c "import torch; print(torch.version.hip)"

after reinstalling pytorch as per instructions on comfy readme now everything works