ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

Expected all tensors to be on the same device, but got tensors is on cuda:0, different from other tensors on cpu (when checking argument in method wrapper_CUDA_cat)

Open Siimonwith2is opened this issue 1 year ago • 3 comments

Custom Node Testing

Your question

Setup for reference latent not working.

Image

Logs

12/2/2025, 1:46:34 PM
------- Scheduler info -------
Total timesteps: tensor([999, 952, 882, 769, 555], device='cuda:0')
Using timesteps: tensor([999, 952, 882, 769, 555], device='cuda:0')
Using sigmas: tensor([1.0000, 0.9523, 0.8823, 0.7692, 0.5555, 0.0000])
------------------------------
12/2/2025, 1:46:34 PM
sigmas: tensor([1.0000, 0.9523, 0.8823, 0.7692, 0.5555, 0.0000])
Number of prompts: 1
Section size: 761.0
context window seq len: 41580
12/2/2025, 1:46:34 PM
Applying FreeNoise
Context schedule enabled: 21 frames, 1 stride, 5 overlap
12/2/2025, 1:46:35 PM
Input sequence length: 41580
Sampling 3041 frames at 960x528 with 5 steps

  0%|          | 0/5 [00:00<?, ?it/s]
  0%|          | 0/5 [00:14<?, ?it/s]
Error during sampling: Expected all tensors to be on the same device, but got tensors is on cuda:0, different from other tensors on cpu (when checking argument in method wrapper_CUDA_cat)
!!! Exception during processing !!! Expected all tensors to be on the same device, but got tensors is on cuda:0, different from other tensors on cpu (when checking argument in method wrapper_CUDA_cat)
Traceback (most recent call last):
  File "/workspace/runpod-slim/ComfyUI/execution.py", line 510, in execute
    output_data, output_ui, has_subgraph, has_pending_tasks = await get_output_data(prompt_id, unique_id, obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, hidden_inputs=hidden_inputs)

Other

No response

Siimonwith2is avatar Dec 02 '25 12:12 Siimonwith2is

I'm also having this issue

jarrodthebobo avatar Dec 15 '25 08:12 jarrodthebobo

I don’t know if this is how you reply in github, nevertheless you dont need to have the reference latent plugged in. You can safely disconnect it, if you added it because you wanted better quality or context, it usually has to do with the reference image.

TL;DR: Disconnect the pink connection in reference latent

Siimonwith2is avatar Dec 15 '25 08:12 Siimonwith2is

This issue is being marked stale because it has not had any activity for 30 days. Reply below within 7 days if your issue still isn't solved, and it will be left open. Otherwise, the issue will be closed automatically.

github-actions[bot] avatar Jan 16 '26 11:01 github-actions[bot]