Free | No tracking | Every fact with a source|German and English

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?

Many custom nodes install their own packages through their requirements.txt. If a package requires a specific torch version (for example xformers or older libraries), pip replaces the existing CUDA version of PyTorch with a version from PyPI. On Windows, that is often a pure CPU version.

How to fix it

  1. Check the version: Portable .\python_embeded\python.exe -c "import torch; print(torch.__version__)". If it ends with +cpu or is missing +cu…, PyTorch was overwritten.
  2. Portable: Open a terminal in the ComfyUI_windows_portable folder for this (right-click in the empty folder area → "Open in Terminal"). Run .\python_embeded\python.exe -m pip uninstall -y torch torchvision torchaudio and 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).
  3. 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.
  4. Manual installation: activate the venv, then pip uninstall torch torchvision torchaudio and pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu130.
  5. Desktop app: Manage → Update → "Change PyTorch" and select the official stack again.
  6. 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.
  7. Prevention: In the ComfyUI Manager, you can enter fixed package versions in the file pip_auto_fix.list (in the Manager folder under ComfyUI\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:

Terms for this

Similar errors

Sources

Checked on Oct 21, 2026. Didn't help? Ask in the forum and name the graphics card, program, and the full message.