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)
Custom Node Testing
- [ ] I have tried disabling custom nodes and the issue persists (see how to disable custom nodes if you need help)
Your question
Setup for reference latent not working.
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
I'm also having this issue
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
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.