Comfy-Org / Comfy-Org/ComfyUI

AssertionError: Torch not compiled with CUDA enabled AGAIN!

Open
#7,433 1 comment 1 reaction 0 assignees View on GitHub
Potential Bug
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 6h
Merged PRs (30d)
155

Description

### Expected Behavior

It should enter UI

### Actual Behavior

When click run_nvidia_gpu.bat it should start the UI service

### Steps to Reproduce

Use Update/update_comfyui_and_python_dependencies.bat
Wait for it to auto update

### Debug Logs

```powershell
C:\ComfyUI_windows_portable>.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build
Checkpoint files will always be loaded safely.
Traceback (most recent call last):
File "C:\ComfyUI_windows_portable\ComfyUI\main.py", line 136, in
import execution
File "C:\ComfyUI_windows_portable\ComfyUI\execution.py", line 13, in
import nodes
File "C:\ComfyUI_windows_portable\ComfyUI\nodes.py", line 22, in
import comfy.diffusers_load
File "C:\ComfyUI_windows_portable\ComfyUI\comfy\diffusers_load.py", line 3, in
import comfy.sd
File "C:\ComfyUI_windows_portable\ComfyUI\comfy\sd.py", line 7, in
from comfy import model_management
File "C:\ComfyUI_windows_portable\ComfyUI\comfy\model_management.py", line 221, in
total_vram = get_total_memory(get_torch_device()) / (1024 * 1024)
^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI_windows_portable\ComfyUI\comfy\model_management.py", line 172, in get_torch_device
return torch.device(torch.cuda.current_device())
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\cuda\__init__.py", line 971, in current_device
_lazy_init()
File "C:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\cuda\__init__.py", line 310, in _lazy_init
raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled
```

### Other

Things I tried
1.Goto ComfyUI_windows_portable\python_embeded\Lib\site-packages, command prompt here
pip install --force-reinstall torch --index-url https://download.pytorch.org/whl/cu118

2.Download a new packed released windows portable comfy UI

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.