Error / Installation
CUDA gone after installing a custom node or package
ComfyUI had been running on the graphics card, but after installing a custom node or Python package, PyTorch suddenly is the CPU version or an incompatible version.
The message
AssertionError: Torch not compiled with CUDA enabled (nach pip install / Custom-Node-Installation)
Affects: ComfyUI
Why is this happening?
How to fix it
- Check the version: Portable
.\python_embeded\python.exe -c "import torch; print(torch.__version__)". If it ends with+cpuor is missing+cu…, PyTorch was overwritten. - Portable: Open a terminal in the
ComfyUI_windows_portablefolder for this (right-clickin the empty folder area → "Open in Terminal"). Run.\python_embeded\python.exe -m pip uninstall -y torch torchvision torchaudioand then.\python_embeded\python.exe -m pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu130(for the cu126 package, instead run.\python_embeded\python.exe -m pip install "torch==2.14.*" "torchvision==0.29.*" "torchaudio==2.14.*" --index-url https://download.pytorch.org/whl/cu126). - Alternatively for Portable: run
update\update_comfyui_and_python_dependencies.bat. According to the docs, the script reinstalls torch, torchvision, and torchaudio from the PyTorch CUDA index and is intended specifically for problems with the Python environment. For the cu126 package on older cards, do not use it once PyTorch 2.15 is released: The script would then fetch a version without support for those cards. - Manual installation: activate the venv, then
pip uninstall torch torchvision torchaudioandpip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu130. - Desktop app: Manage → Update → "Change PyTorch" and select the official stack again.
- Find the cause: Disable the custom node you installed most recently in the ComfyUI Manager or move its folder out of
ComfyUI\custom_nodes. Report the problem to the node's developer. - Prevention: In the ComfyUI Manager, you can enter fixed package versions in the file
pip_auto_fix.list(in the Manager folder underComfyUI\user\__manager\) that the Manager automatically restores after node installations.
Better not: Do not blindly run pip install -r requirements.txt from any custom nodes without checking the torch version afterward.
Set up from scratch again
If it still doesn’t work after that, a fresh setup step by step often helps:
- Set up and maintain ComfyUI on Windows
Desktop or Portable, where the models belong, sharing models with other programs, safely installing custom nodes, updates, startup options … - Your First Image with ComfyUI
Install Comfy Desktop, learn the interface, and create your first AI image with FLUX.2 [small] 4B or Z-Image Turbo. - Your First AI Video with LTX in ComfyUI
Use LTX-2.3 in ComfyUI to create short videos with sound from text or an image. Template, files, settings, and license.
Terms for this
Similar errors
Sources
- https://github.com/Comfy-Org/ComfyUI/blob/master/README.md
- https://docs.comfy.org/troubleshooting/overview
- https://docs.comfy.org/installation/comfyui_portable_windows
- https://github.com/Comfy-Org/ComfyUI/blob/master/.github/workflows/windows_release_dependencies.yml
- https://github.com/Comfy-Org/ComfyUI-Manager/blob/main/README.md
- https://docs.comfy.org/installation/desktop/usage/manage
- https://docs.comfy.org/troubleshooting/custom-node-issues
Checked on Oct 21, 2026. Didn't help? Ask in the forum and name the graphics card, program, and the full message.