RuntimeError with ernie turbo on xpu
- Dominant language
- Python
- Stars
- 133k
- Forks
- 15.7k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 155
Description
### Custom Node Testing
- [ ] I have tried disabling custom nodes and the issue persists (see [how to disable custom nodes](https://docs.comfy.org/troubleshooting/custom-node-issues#step-1%3A-test-with-all-custom-nodes-disabled) if you need help)
### Expected Behavior
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, xpu:0 and cpu!
### Actual Behavior
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, xpu:0 and cpu!
### Steps to Reproduce
Run the official ernie turbo workflow from comfyui
### Debug Logs
```powershell
================================================
Starting ComfyUI with Intel Arc XPU
================================================
comfy-aimdo failed to load: Could not find module 'C:\ComfyUI\comfyui_venv\Lib\site-packages\comfy_aimdo\aimdo.dll' (or one of its dependencies). Try using the full path with constructor syntax.
NOTE: comfy-aimdo is currently only support for Nvidia GPUs
[START] Security scan
[DONE] Security scan
## ComfyUI-Manager: installing dependencies done.
** ComfyUI startup time: 2026-04-15 00:29:23.728
** Platform: Windows
** Python version: 3.11.9 (tags/v3.11.9:de54cf5, Apr 2 2024, 10:12:12) [MSC v.1938 64 bit (AMD64)]
** Python executable: C:\ComfyUI\comfyui_venv\Scripts\python.exe
** ComfyUI Path: C:\ComfyUI\custom_nodes\comfyui-impact-pack/../../
** ComfyUI Base Folder Path: C:\ComfyUI\custom_nodes\comfyui-impact-pack/../../
** User directory: C:\ComfyUI\user
** ComfyUI-Manager config path: C:\ComfyUI\user\__manager\config.ini
** Log path: C:\ComfyUI\user\comfyui.log
Prestartup times for custom nodes:
0.0 seconds: C:\ComfyUI\custom_nodes\rgthree-comfy
5.2 seconds: C:\ComfyUI\custom_nodes\ComfyUI-Manager
Found comfy_kitchen backend triton: {'available': True, 'disabled': True, 'unavailable_reason': None, 'capabilities': ['apply_rope', 'apply_rope1', 'dequantize_nvfp4', 'dequantize_per_tensor_fp8', 'quantize_mxfp8', 'quantize_nvfp4', 'quantize_per_tensor_fp8']}
Found comfy_kitchen backend eager: {'available': True, 'disabled': False, 'unavailable_reason': None, 'capabilities': ['apply_rope', 'apply_rope1', 'dequantize_mxfp8', 'dequantize_nvfp4', 'dequantize_per_tensor_fp8', 'quantize_mxfp8', 'quantize_nvfp4', 'quantize_per_tensor_fp8', 'scaled_mm_mxfp8', 'scaled_mm_nvfp4']}
Found comfy_kitchen backend cuda: {'available': False, 'disabled': True, 'unavailable_reason': 'CUDA not available on this system', 'capabilities': []}
Checkpoint files will always be loaded safely.
Total VRAM 25969 MB, total RAM 32305 MB
pytorch version: 2.12.0.dev20260414+xpu
Set vram state to: NORMAL_VRAM
Device: xpu:0 Intel(R) Arc(TM) 140V GPU (16GB)
Using pytorch attention
Python version: 3.11.9 (tags/v3.11.9:de54cf5, Apr 2 2024, 10:12:12) [MSC v.1938 64 bit (AMD64)]
ComfyUI version: 0.19.0
comfy-aimdo version: 0.2.12
comfy-kitchen version: 0.2.8
Initializing frontend: Comfy-Org/ComfyUI_frontend@latest, requesting version details from GitHub...
[Prompt Server] web root: C:\ComfyUI\web_custom_versions\Comfy-Org_ComfyUI_frontend\1.44.4
Asset seeder disabled
ComfyUI-GGUF: Allowing full torch compile
### Loading: ComfyUI-Impact-Pack (V8.28.2)
[Impact Pack] Wildcard total size (0.00 MB) is within cache limit (50.00 MB). Using full cache mode.
[Impact Pack] Wildcards loading done.
W0415 00:29:50.095000 243748 comfyui_venv\Lib\site-packages\torch\utils\_pytree.py:630] is an Enum subclass and is now natively supported by torch.compile as an opaque value type. Calling register_constant() on Enum subclasses is deprecated and will be an error in a future release.
W0415 00:29:50.364000 243748 comfyui_venv\Lib\site-packages\torch\utils\_pytree.py:630] is an Enum subclass and is now natively supported by torch.compile as an opaque value type. Calling register_constant() on Enum subclasses is deprecated and will be an error in a future release.
### Loading: ComfyUI-Manager (V3.39.2)
[ComfyUI-Manager] network_mode: public
[ComfyUI-Manager] ComfyUI per-queue preview override detected (PR #11261). Manager's preview method feature is disabled. Use ComfyUI's --preview-method CLI option or 'Settings > Execution > Live preview method'.
### ComfyUI Version: v0.19.0-6-gc5569e8 | Released on '2026-04-14'
======================================================================
🎙️ ComfyUI-Pocket-TTS - Loading...
======================================================================
[ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/alter-list.json
[ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/model-list.json
[ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/extension-node-map.json
[ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/github-stats.json
✅ Pocket TTS library imported successfully
======================================================================
✅ Pocket TTS nodes registered
======================================================================
✅ ComfyUI-Pocket-TTS v1.0.2 loaded
********
Warning: flash-attn is not installed. Will only run the manual PyTorch version. Please install flash-attn for faster inference.
********
[ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/custom-node-list.json
✅ [Qwen3-TTS] CPU multi-core optimization enabled - Using 8 cores
✅ ComfyUI-Qwen3-TTS v1.2.5 loaded
Fictiverse nodes loaded.
Fictiverse nodes loaded.
Initializing ControlAltAI Nodes
Using pytorch attention
(RES4LYF) Init
(RES4LYF) Importing beta samplers.
(RES4LYF) Importing legacy samplers.
[rgthree-comfy] Loaded 48 epic nodes. 🎉
[rgthree-comfy] ComfyUI's new Node 2.0 rendering may be incompatible with some rgthree-comfy nodes and features, breaking some rendering as well as losing the ability to access a node's properties (a vital part of many nodes). It also appears to run MUCH more slowly spiking CPU usage and causing jankiness and unresponsiveness, especially with large workflows. Personally I am not planning to use the new Nodes 2.0 and, unfortunately, am not able to invest the time to investigate and overhaul rgthree-comfy where needed. If you have issues when Nodes 2.0 is enabled, I'd urge you to switch it off as well and join me in hoping ComfyUI is not planning to deprecate the existing, stable canvas rendering all together.
Import times for custom nodes:
0.0 seconds: C:\ComfyUI\custom_nodes\websocket_image_save.py
0.0 seconds: C:\ComfyUI\custom_nodes\comfyui-simple-prompt-batcher
0.0 seconds: C:\ComfyUI\custom_nodes\comfyui_llama_swap
0.0 seconds: C:\ComfyUI\custom_nodes\ComfyUI-Simple-LlamaCPP-Client
0.0 seconds: C:\ComfyUI\custom_nodes\Comfyui-Memory_Cleanup
0.0 seconds: C:\ComfyUI\custom_nodes\ComfyUI-Image-Size-Tools
0.0 seconds: C:\ComfyUI\custom_nodes\comfyui_essentials
0.0 seconds: C:\ComfyUI\custom_nodes\ComfyUI-MelBandRoFormer
0.0 seconds: C:\ComfyUI\custom_nodes\ComfyUI-load-lora-from-url
0.0 seconds: C:\ComfyUI\custom_nodes\ComfyMath
0.0 seconds: C:\ComfyUI\custom_nodes\ComfyUI_Fictiverse
0.0 seconds: C:\ComfyUI\custom_nodes\ControlAltAI-Nodes
0.0 seconds: C:\ComfyUI\custom_nodes\gguf
0.0 seconds: C:\ComfyUI\custom_nodes\comfyui-custom-scripts
0.0 seconds: C:\ComfyUI\custom_nodes\comfyui-frame-interpolation
0.0 seconds: C:\ComfyUI\custom_nodes\ComfyUI-GGUF
0.0 seconds: C:\ComfyUI\custom_nodes\rgthree-comfy
0.0 seconds: C:\ComfyUI\custom_nodes\ComfyUI-KJNodes
0.2 seconds: C:\ComfyUI\custom_nodes\ComfyUI-faster-whisper
0.4 seconds: C:\ComfyUI\custom_nodes\ComfyUI-Impact-Pack
0.6 seconds: C:\ComfyUI\custom_nodes\comfyui-simple-pocket-tts
0.6 seconds: C:\ComfyUI\custom_nodes\ComfyUI-VideoHelperSuite
0.7 seconds: C:\ComfyUI\custom_nodes\ComfyUI-Manager
0.7 seconds: C:\ComfyUI\custom_nodes\RES4LYF
0.8 seconds: C:\ComfyUI\custom_nodes\comfyui-simple-qwen3-tts
2.5 seconds: C:\ComfyUI\custom_nodes\ComfyUI-LTXVideo
Context impl SQLiteImpl.
Will assume non-transactional DDL.
Disabling intermediate node cache.
Starting server
To see the GUI go to: http://0.0.0.0:8188
FETCH ComfyRegistry Data: 5/138
FETCH ComfyRegistry Data: 10/138
FETCH ComfyRegistry Data: 15/138
FETCH ComfyRegistry Data: 20/138
FETCH ComfyRegistry Data: 25/138
FETCH ComfyRegistry Data: 30/138
FETCH ComfyRegistry Data: 35/138
FETCH ComfyRegistry Data: 40/138
FETCH ComfyRegistry Data: 45/138
FETCH ComfyRegistry Data: 50/138
FETCH ComfyRegistry Data: 55/138
FETCH ComfyRegistry Data: 60/138
FETCH ComfyRegistry Data: 65/138
FETCH ComfyRegistry Data: 70/138
FETCH ComfyRegistry Data: 75/138
FETCH ComfyRegistry Data: 80/138
FETCH ComfyRegistry Data: 85/138
FETCH ComfyRegistry Data: 90/138
FETCH ComfyRegistry Data: 95/138
FETCH ComfyRegistry Data: 100/138
FETCH ComfyRegistry Data: 105/138
FETCH ComfyRegistry Data: 110/138
FETCH ComfyRegistry Data: 115/138
FETCH ComfyRegistry Data: 120/138
FETCH ComfyRegistry Data: 125/138
FETCH ComfyRegistry Data: 130/138
FETCH ComfyRegistry Data: 135/138
FETCH ComfyRegistry Data [DONE]
[ComfyUI-Manager] default cache updated: https://api.comfy.org/nodes
FETCH DATA from: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/custom-node-list.json [DONE]
[ComfyUI-Manager] All startup tasks have been completed.
[DEPRECATION WARNING] Detected import of deprecated legacy API: /scripts/ui.js. This is likely caused by a custom node extension using outdated APIs. Please update your extensions or contact the extension author for an updated version.
[DEPRECATION WARNING] Detected import of deprecated legacy API: /extensions/core/clipspace.js. This is likely caused by a custom node extension using outdated APIs. Please update your extensions or contact the extension author for an updated version.
[DEPRECATION WARNING] Detected import of deprecated legacy API: /extensions/core/groupNode.js. This is likely caused by a custom node extension using outdated APIs. Please update your extensions or contact the extension author for an updated version.
[DEPRECATION WARNING] Detected import of deprecated legacy API: /extensions/core/widgetInputs.js. This is likely caused by a custom node extension using outdated APIs. Please update your extensions or contact the extension author for an updated version.
[DEPRECATION WARNING] Detected import of deprecated legacy API: /scripts/ui/components/button.js. This is likely caused by a custom node extension using outdated APIs. Please update your extensions or contact the extension author for an updated version.
[DEPRECATION WARNING] Detected import of deprecated legacy API: /scripts/ui/components/buttonGroup.js. This is likely caused by a custom node extension using outdated APIs. Please update your extensions or contact the extension author for an updated version.
got prompt
Using pytorch attention in VAE
Using pytorch attention in VAE
VAE load device: xpu:0, offload device: cpu, dtype: torch.bfloat16
Requested to load ErnieTEModel
loaded completely; 6540.31 MB loaded, full load: True
CLIP/text encoder model load device: xpu:0, offload device: cpu, current: xpu:0, dtype: torch.float16
model weight dtype torch.bfloat16, manual cast: None
model_type FLOW
Requested to load ErnieImage
loaded completely; 24449.46 MB usable, 15322.67 MB loaded, full load: True
0%| | 0/8 [00:00
emb = torch.cat([rope(ids[..., i], self.axes_dim[i], self.theta) for i in range(3)], dim=-1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI\comfy\ldm\ernie\model.py", line 18, in rope
out = torch.einsum("...n,d->...nd", pos, omega)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI\comfyui_venv\Lib\site-packages\torch\functional.py", line 373, in einsum
return _VF.einsum(equation, operands) # type: ignore[attr-defined]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, xpu:0 and cpu!
Prompt executed in 61.28 seconds
```
### Other
_No response_
Contributor guide
Research direction
Start by reproducing the official Ernie Turbo workflow on the Intel Arc XPU setup described in the logs, first checking the custom-node isolation step. Read execution.py around line 534 and capture the complete traceback beyond that entry point. Done means the workflow runs without the xpu:0 and CPU device-mismatch RuntimeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- backend, machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100