Running comfyui update broke comfyui (I think it installed cuda 13 instead of 12 so the app is dead now)

Open
#17,687 8 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
python, pytorch

Research direction

Start by checking update_comfyui_and_python_dependencies.bat, which the report says installs PyTorch from the CUDA 13 package index, and compare that with the portable Windows install’s supported PyTorch versions. Reproduce or inspect the dependency update and its resulting Torch build; done means the update leaves the app able to detect and use the GPU, with a clear recovery path for affected installs.

Written by the indexing model from the issue text.

Description

Potential Bug
Custom Node Testing
Expected Behavior

Comfyui should start like it always did on the system

Actual Behavior

updated comfyui using the
update_comfyui_and_python_dependencies.bat

Comfyui is broken throws this error now, can't find the gpu, reverting to the previous version doesn't work. still broken.

Traceback (most recent call last):
  File "E:\ComfyUI_windows_portable\ComfyUI\main.py", line 268, in <module>
    import execution
  File "E:\ComfyUI_windows_portable\ComfyUI\execution.py", line 17, in <module>
    import comfy.model_management
  File "E:\ComfyUI_windows_portable\ComfyUI\comfy\model_management.py", line 364, in <module>
    total_vram = get_total_memory(get_torch_device()) / (1024 * 1024)
                                  ~~~~~~~~~~~~~~~~^^
  File "E:\ComfyUI_windows_portable\ComfyUI\comfy\model_management.py", line 213, in get_torch_device
    return torch.device(torch.cuda.current_device())
                        ~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "E:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\cuda\__init__.py", line 1357, in current_device
    _lazy_init()
    ~~~~~~~~~~^^
  File "E:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\cuda\__init__.py", line 609, in _lazy_init
    raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled

looking at update_comfyui_and_python_dependencies.bat AFTER because who knew I will got stabbed in the back

@echo off
call update_comfyui.bat nopause
echo -
echo This will try to update pytorch and all python dependencies.
echo -
echo If you just want to update normally, close this and run update_comfyui.bat instead.
echo -
pause
..\python_embeded\python.exe -s -m pip install --upgrade torch torchvision torchaudio  --extra-index-url https://download.pytorch.org/whl/cu130 -r ../ComfyUI/requirements.txt pygit2
pause

it shows it straight attempted to install cuda 13 WTF?? WHY BRO? Why U put trap like that in that file?!? I've used the same bat file last week and it worked fine so there was no force to cuda13 in that bat

anyway now HOW TO I GET BACK TO THE VERSION THAT WORKED??? I don't even know WHAT version I've had before.

Steps to Reproduce

DON'T TRY TO UPDATE USING THAT BAT FILE

Debug Logs
Traceback (most recent call last):
  File "E:\ComfyUI_windows_portable\ComfyUI\main.py", line 268, in <module>
    import execution
  File "E:\ComfyUI_windows_portable\ComfyUI\execution.py", line 17, in <module>
    import comfy.model_management
  File "E:\ComfyUI_windows_portable\ComfyUI\comfy\model_management.py", line 364, in <module>
    total_vram = get_total_memory(get_torch_device()) / (1024 * 1024)
                                  ~~~~~~~~~~~~~~~~^^
  File "E:\ComfyUI_windows_portable\ComfyUI\comfy\model_management.py", line 213, in get_torch_device
    return torch.device(torch.cuda.current_device())
                        ~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "E:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\cuda\__init__.py", line 1357, in current_device
    _lazy_init()
    ~~~~~~~~~~^^
  File "E:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\cuda\__init__.py", line 609, in _lazy_init
    raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled
Other

No response

Dominant language
Python
Stars
146k
Forks
17.4k
Avg merge
19h 44m
Merged PRs (30d)
178

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Comfy-Org/ComfyUI

All issues in Comfy-Org/ComfyUI

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.