The message
AssertionError: Torch not compiled with CUDA enabled
Affects: SwarmUI
Why is this happening?
According to the SwarmUI docs, the Python packages in the Comfy backend are then mixed up. This usually happens when custom nodes bring their own package versions through the Comfy Manager and replace torch in the process.
How to fix it
- Restart SwarmUI and your PC once. Then check under Server > Logs (set ViewType to Debug) to see the exact error message.
- Open a command prompt in the folder
(your SwarmUI folder)\dlbackend\comfy. - Reinstall PyTorch, using all three packages from the same CUDA variant:
python_embeded\python.exe -s -m pip install torch torchvision torchaudio -U --index-url https://download.pytorch.org/whl/cu130. For RTX-20 cards and newer, cu130 is the current variant according to ComfyUI; for GTX-10 cards, use cu126 (see the entry “CUDA error: no kernel image”). - Restart SwarmUI and check whether the backend is running.
- If that doesn’t help, do a clean reinstall: close SwarmUI, rename the folder to
Old_SwarmUI, run the installer again, and then copy backData,Models, andOutput.
Better not: After that, don’t install node packages randomly through the Comfy Manager again; according to the docs, that’s the most common reason for a broken backend.
Terms for this
Similar errors
Sources
- https://raw.githubusercontent.com/mcmonkeyprojects/SwarmUI/master/docs/Troubleshooting.md
- https://raw.githubusercontent.com/comfyanonymous/ComfyUI/master/README.md
Checked on Oct 21, 2026. Didn't help? Ask in the forum and name the graphics card, program, and the full message.