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

Error / Other

Expected all tensors to be on the same device (data partly on GPU, partly on CPU)

A node is calculating with data where part of it is in VRAM and part is in RAM — this is almost always a programming error in that node.

The message

RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu!

Affects: ComfyUI

Why is this happening?

PyTorch can only compute when all data involved is on the same device. If a node forgets to move a weight or a mask to the graphics card, you get this message. This happens especially when parts of a model are moved to RAM because of low VRAM. The usual cause is Custom Nodes or newly supported models, and sometimes built-in nodes too; these errors are fixed in updates.

How to fix it

  1. Read the last lines of the error message in the console window. If you see a path with custom_nodes\…, the error is in that Custom Node; otherwise, it is in ComfyUI itself.
  2. Update ComfyUI. Portable: run update\update_comfyui.bat in the ComfyUI_windows_portable folder. Desktop app: Manage → Update tab. Manual installation: activate venv, run git pull in the ComfyUI folder, then pip install -r requirements.txt.
  3. Update all Custom Nodes through the ComfyUI Manager and restart ComfyUI.
  4. Test without Custom Nodes. Portable: open a terminal in the ComfyUI_windows_portable folder and run .\python_embeded\python.exe -s ComfyUI\main.py --disable-all-custom-nodes --windows-standalone-build. Manual installation: python main.py --disable-all-custom-nodes. Desktop app: start with Custom Nodes disabled in the settings.
  5. If the error is gone without Custom Nodes, turn them back on one by one until you find the culprit, and report the error with the console log on its GitHub page.
  6. If the error still happens without Custom Nodes, report it to ComfyUI on GitHub with the log and workflow. Until it is fixed, it often helps to replace the affected node with a different approach.

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 27, 2026. Didn't help? Ask in the forum and name the graphics card, program, and the full message.