simonlui / Docker_IPEX_ComfyUI

Stable Diffusion ComfyUI Docker/OCI Image for Intel Arc GPUs
Apache License 2.0
27 stars 2 forks source link

ERROR: No Nvidia driver on system #1

Closed gmbhneo closed 9 months ago

gmbhneo commented 10 months ago

Getting the following error:

Traceback (most recent call last): File "/ComfyUI/main.py", line 72, in import execution File "/ComfyUI/execution.py", line 12, in import nodes File "/ComfyUI/nodes.py", line 20, in import comfy.diffusers_load File "/ComfyUI/comfy/diffusers_load.py", line 4, in import comfy.sd File "/ComfyUI/comfy/sd.py", line 5, in from comfy import model_management File "/ComfyUI/comfy/model_management.py", line 114, in total_vram = get_total_memory(get_torch_device()) / (1024 * 1024) File "/ComfyUI/comfy/model_management.py", line 83, in get_torch_device return torch.device(torch.cuda.current_device()) File "/deps/venv/lib/python3.10/site-packages/torch/cuda/init.py", line 769, in current_device _lazy_init() File "/deps/venv/lib/python3.10/site-packages/torch/cuda/init.py", line 298, 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

simonlui commented 10 months ago

Sorry, I forgot to put a note up about this, but this is due to another issue, https://github.com/oneapi-src/oneapi-ci/issues/77 where the Intel apt repository isn't working with the current Docker image at all at the moment due to expired keys. I'll work on a workaround as soon as I can since you have brought it up but I was planning on waiting on Intel to fix it on their end.

simonlui commented 10 months ago

I just pushed some changes. Do a clean build of the image and see if that fixes your issues.

gmbhneo commented 10 months ago

Looks like the issue is still present:

This is my command to start:

docker run -it --device /dev/dxg -e ComfyArgs="--highvram" --name comfy-server --network=host -p 8188:8188 -v /usr/lib/wsl:/usr/lib/wsl -v deps:/deps -v huggingface:/root/.cache/huggingface ipex-arc-comfy:latest

This is the error:

No command to use ipexrun to launch ComfyUI. Launching normally. Traceback (most recent call last): File "/ComfyUI/main.py", line 72, in import execution File "/ComfyUI/execution.py", line 12, in import nodes File "/ComfyUI/nodes.py", line 20, in import comfy.diffusers_load File "/ComfyUI/comfy/diffusers_load.py", line 4, in import comfy.sd File "/ComfyUI/comfy/sd.py", line 5, in from comfy import model_management File "/ComfyUI/comfy/model_management.py", line 114, in total_vram = get_total_memory(get_torch_device()) / (1024 * 1024) File "/ComfyUI/comfy/model_management.py", line 83, in get_torch_device return torch.device(torch.cuda.current_device()) File "/deps/venv/lib/python3.10/site-packages/torch/cuda/init.py", line 769, in current_device _lazy_init() File "/deps/venv/lib/python3.10/site-packages/torch/cuda/init.py", line 298, 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

simonlui commented 10 months ago

Sorry, had a busy week. You should've mentioned that you are using WSL2 here since that makes more sense in the context of this backtrace. The core problem is that your Intel GPU/IPEX is not being recognized and the code in ComfyUI is assuming you are using CUDA when it tries to detect it. I don't think it's the Docker image since I would know if that was broken since it is working for me. What drivers and GPU do you have on your Windows system?

gmbhneo commented 10 months ago

I am not using any WSL system. Just simple Windows 11. I've copied the starting parameters from your about page.

This is an Intel Special Edition 16GB 770 Arc. Latest Drivers : gfx_win_101.4952.exe

simonlui commented 10 months ago

Well, that explains why you are having issues. You need to set up WSL2 and pass it through there in order for the Docker image to work on Windows. I thought that was obvious but apparently not so I'll add some notes on that in the README as a prerequisite. If you want to not do that, then you need to run it natively and I have instructions on that in the discussion thread for ComfyUI here

simonlui commented 9 months ago

Can you confirm if your issue has been fixed? Otherwise, I will be closing the issue soon.