I've been using comfyui just fine all day. I close out and come back to it an hour later and cant get back in raise AssertionError
Expected Behavior
When I click "run_nvidia_gpu" file on a windows computer (Comfyui Windows portable) I expect terminal to launch Comfyui for me in Firefox
Actual Behavior
Terminal gives me this error and says "press any key to continue" and then terminal closes and comfyui doesnt open. Full terminal code pasted under debug log below.
Steps to Reproduce
Double click "run_nvidia_gpu" file within Comfyui Windows Portable. then go to manager and install Lora-Training-In-Comfy. I'm not the only person to have this issue: https://github.com/comfyanonymous/ComfyUI/discussions/3802
Debug Logs
D:\ComfyUI_windows_portable>.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build
[START] Security scan
[DONE] Security scan
## ComfyUI-Manager: installing dependencies done.
** ComfyUI startup time: 2024-08-25 21:59:24.244525
** Platform: Windows
** Python version: 3.11.9 (tags/v3.11.9:de54cf5, Apr 2 2024, 10:12:12) [MSC v.1938 64 bit (AMD64)]
** Python executable: D:\ComfyUI_windows_portable\python_embeded\python.exe
** ComfyUI Path: D:\ComfyUI_windows_portable\ComfyUI
** Log path: D:\ComfyUI_windows_portable\comfyui.log
Prestartup times for custom nodes:
0.0 seconds: D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\rgthree-comfy
0.0 seconds: D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Easy-Use
2.1 seconds: D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Manager
Traceback (most recent call last):
File "D:\ComfyUI_windows_portable\ComfyUI\main.py", line 86, in <module>
import execution
File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 13, in <module>
import nodes
File "D:\ComfyUI_windows_portable\ComfyUI\nodes.py", line 21, in <module>
import comfy.diffusers_load
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\diffusers_load.py", line 3, in <module>
import comfy.sd
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\sd.py", line 5, in <module>
from comfy import model_management
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\model_management.py", line 142, in <module>
total_vram = get_total_memory(get_torch_device()) / (1024 * 1024)
^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\model_management.py", line 111, in get_torch_device
return torch.device(torch.cuda.current_device())
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\cuda\__init__.py", line 878, in current_device
_lazy_init()
File "D:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\cuda\__init__.py", line 305, in _lazy_init
raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled
D:\ComfyUI_windows_portable>pause
Press any key to continue . . .
Other
No response
Expected Behavior
When I click "run_nvidia_gpu" file on a windows computer (Comfyui Windows portable) I expect terminal to launch Comfyui for me in Firefox
Actual Behavior
Terminal gives me this error and says "press any key to continue" and then terminal closes and comfyui doesnt open. Full terminal code pasted under debug log below.
Steps to Reproduce
Double click "run_nvidia_gpu" file within Comfyui Windows Portable. then go to manager and install Lora-Training-In-Comfy. I'm not the only person to have this issue: #3802
Debug Logs
D:\ComfyUI_windows_portable>.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build [START] Security scan [DONE] Security scan ## ComfyUI-Manager: installing dependencies done. ** ComfyUI startup time: 2024-08-25 21:59:24.244525 ** Platform: Windows ** Python version: 3.11.9 (tags/v3.11.9:de54cf5, Apr 2 2024, 10:12:12) [MSC v.1938 64 bit (AMD64)] ** Python executable: D:\ComfyUI_windows_portable\python_embeded\python.exe ** ComfyUI Path: D:\ComfyUI_windows_portable\ComfyUI ** Log path: D:\ComfyUI_windows_portable\comfyui.log Prestartup times for custom nodes: 0.0 seconds: D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\rgthree-comfy 0.0 seconds: D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Easy-Use 2.1 seconds: D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Manager Traceback (most recent call last): File "D:\ComfyUI_windows_portable\ComfyUI\main.py", line 86, in <module> import execution File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 13, in <module> import nodes File "D:\ComfyUI_windows_portable\ComfyUI\nodes.py", line 21, in <module> import comfy.diffusers_load File "D:\ComfyUI_windows_portable\ComfyUI\comfy\diffusers_load.py", line 3, in <module> import comfy.sd File "D:\ComfyUI_windows_portable\ComfyUI\comfy\sd.py", line 5, in <module> from comfy import model_management File "D:\ComfyUI_windows_portable\ComfyUI\comfy\model_management.py", line 142, in <module> total_vram = get_total_memory(get_torch_device()) / (1024 * 1024) ^^^^^^^^^^^^^^^^^^ File "D:\ComfyUI_windows_portable\ComfyUI\comfy\model_management.py", line 111, in get_torch_device return torch.device(torch.cuda.current_device()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\cuda\__init__.py", line 878, in current_device _lazy_init() File "D:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\cuda\__init__.py", line 305, in _lazy_init raise AssertionError("Torch not compiled with CUDA enabled") AssertionError: Torch not compiled with CUDA enabled D:\ComfyUI_windows_portable>pause Press any key to continue . . .Other
No response
same problem
Expected Behavior
When I click "run_nvidia_gpu" file on a windows computer (Comfyui Windows portable) I expect terminal to launch Comfyui for me in Firefox
Actual Behavior
Terminal gives me this error and says "press any key to continue" and then terminal closes and comfyui doesnt open. Full terminal code pasted under debug log below.
Steps to Reproduce
Double click "run_nvidia_gpu" file within Comfyui Windows Portable. then go to manager and install Lora-Training-In-Comfy. I'm not the only person to have this issue: #3802
Debug Logs
D:\ComfyUI_windows_portable>.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build [START] Security scan [DONE] Security scan ## ComfyUI-Manager: installing dependencies done. ** ComfyUI startup time: 2024-08-25 21:59:24.244525 ** Platform: Windows ** Python version: 3.11.9 (tags/v3.11.9:de54cf5, Apr 2 2024, 10:12:12) [MSC v.1938 64 bit (AMD64)] ** Python executable: D:\ComfyUI_windows_portable\python_embeded\python.exe ** ComfyUI Path: D:\ComfyUI_windows_portable\ComfyUI ** Log path: D:\ComfyUI_windows_portable\comfyui.log Prestartup times for custom nodes: 0.0 seconds: D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\rgthree-comfy 0.0 seconds: D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Easy-Use 2.1 seconds: D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Manager Traceback (most recent call last): File "D:\ComfyUI_windows_portable\ComfyUI\main.py", line 86, in <module> import execution File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 13, in <module> import nodes File "D:\ComfyUI_windows_portable\ComfyUI\nodes.py", line 21, in <module> import comfy.diffusers_load File "D:\ComfyUI_windows_portable\ComfyUI\comfy\diffusers_load.py", line 3, in <module> import comfy.sd File "D:\ComfyUI_windows_portable\ComfyUI\comfy\sd.py", line 5, in <module> from comfy import model_management File "D:\ComfyUI_windows_portable\ComfyUI\comfy\model_management.py", line 142, in <module> total_vram = get_total_memory(get_torch_device()) / (1024 * 1024) ^^^^^^^^^^^^^^^^^^ File "D:\ComfyUI_windows_portable\ComfyUI\comfy\model_management.py", line 111, in get_torch_device return torch.device(torch.cuda.current_device()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\cuda\__init__.py", line 878, in current_device _lazy_init() File "D:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\cuda\__init__.py", line 305, in _lazy_init raise AssertionError("Torch not compiled with CUDA enabled") AssertionError: Torch not compiled with CUDA enabled D:\ComfyUI_windows_portable>pause Press any key to continue . . .Other
No response
same problem
https://github.com/comfyanonymous/ComfyUI/issues/2427
https://github.com/comfyanonymous/ComfyUI/issues/2427
havent solved it yet
#2427
havent solved it yet
You need to reinstall torch.
Issue is likely with custom nodes reinstalling pytorch+cpu instead of CUDA because of poorly written requirements or dependencies. Reinstall torch with CUDA https://pytorch.org/get-started/locally/
in comfyui portable reinstalling torch with cuda will not work. Script will force to reinstall torch anyway. Even when you delete torch from requirements.txt from all custom nodes it will still try to reinstall torch without cuda. There must be another file that force startup script to reinstall some dependencies, in this case it's torch.
in comfyui portable reinstalling torch with cuda will not work. Script will force to reinstall torch anyway. Even when you delete torch from requirements.txt from all custom nodes it will still try to reinstall torch without cuda. There must be another file that force startup script to reinstall some dependencies, in this case it's torch.
Is ComfyUI-Manager up to date?
The latest version of ComfyUI-Manager includes a two-step fail-safe mechanism for torch.
In the first step, it blocks the installation of torch listed directly in the requirements.txt.
In the second step, even if torch is reinstalled due to indirect dependencies, it restores and reinstalls the original torch.
If the issue still occurs with the latest version, ComfyUI-Manager 2.55.5, please report it to the ComfyUI-Manager repo along with the installation logs.