Intel Arc / 核显用户报 Torch not compiled with CUDA enabled:其实是该走 XPU 而不是 CUDA / 全站资源搜索
搜索 更新 2026-10-02
报错 098 硬件、驱动、操作系统与非 N 卡环境 有来源可查

Intel Arc / 核显用户报 Torch not compiled with CUDA enabled——其实是该走 XPU 而不是 CUDA

报错原文(原样)
Error occurred when executing IPAdapter:
Could not run 'aten::_upsample_bicubic2d_aa.out' with arguments from the 'XPU' backend. This could be because the operator doesn't exist for this backend, or was omitted during the selective/custom build process (if using custom build). 'aten::_upsample_bicubic2d_aa.out' is only available for these backends: [CPU, Meta, BackendSelect, Python, FuncTorchDynamicLayerBackMode, Functionalize, Named, Conjugate, Negative, ZeroTensor, ADInplaceOrView, AutogradOther, AutogradCPU, AutogradCUDA, AutogradHIP, AutogradXLA, AutogradMPS, AutogradIPU, AutogradXPU, AutogradHPU, AutogradVE, AutogradLazy, AutogradMTIA, AutogradPrivateUse1, AutogradPrivateUse2, AutogradPrivateUse3, AutogradMeta, AutogradNestedTensor, Tracer, AutocastCPU, AutocastXPU, AutocastCUDA, ...].
检索关键词 Intel Arc、aten::_upsample_bicubic2d_aa.out、arguments from the 'XPU' backend、operator does not exist for this backend、torch.xpu.is_available()、intel-extension-for-pytorch、--disable-ipex-optimize
先看这一句 Intel Arc 独显或 Core Ultra 核显用户装完 ComfyUI 报 Torch not compiled with CUDA enabled;照 NVIDIA 教程反复重装 CUDA 版 torch 也没用。
适用版本 Intel GPU 支持在官方文档中标注为实验性(Experimental support via oneAPI/XPU)。torch XPU 的稳定/预览索引随时间演进,命令以官方文档当前版本为准。 · 核实日期 2026-09-26 · 状态 已核实
适用环境:Windows 便携版、Linux + 云 GPU、全部主流环境

现象与触发场景

常见触发场景:

  • Intel Arc A 系列 / Arc B 系列 / Core Ultra 核显上装 ComfyUI
  • 误按 NVIDIA 教程装了 CUDA 版 torch
  • 装了 XPU 版 torch 但没装 IPEX,或插件/算子缺 XPU kernel

根因

  • Intel GPU 用的是 XPU 后端不是 CUDA。官方文档明确:在 Intel GPU 上这条错误表示 ComfyUI 尝试使用 CUDA 是因为 XPU 后端不可用,不要按 NVIDIA CUDA 的步骤重装。
  • XPU 需要专门的 torch 构建(--index-url https://download.pytorch.org/whl/xpu)以及较新的 Intel 显卡驱动;缺一不可。
  • 部分算子没有 XPU 实现,插件会在运行时把不支持的操作回退到 CPU,甚至直接报错(例如社区记录过 aten::_upsample_bicubic2d_aa 在 Intel Arc 上失败、以及 xpu 不在支持设备集合里的 dequantize 报错)。
  • XPU 后端缺少部分算子实现:issue #4154 的报错原文就是 aten::_upsample_bicubic2d_aa.out 在 XPU 上不可用(该算子在 CPU/CUDA/MPS 等后端存在,但不在此 torch 构建的 XPU 后端里),触发节点是 IPAdapter 里的 ClipVision 预处理。

解决步骤

已按「最可能有效」排序。请从上往下做,每做完一步用「验证」确认,不要一次改五处。

  1. 先确认 PyTorch 能不能看到 Intel GPU
    用 torch.xpu 接口自检。官方文档给的检查语句为 hasattr(torch,'xpu') and torch.xpu.is_available();返回 True 时 ComfyUI 会自动使用 XPU 后端。
    python -c "import torch; print('XPU available:', hasattr(torch, 'xpu') and torch.xpu.is_available())"
    python -c "import torch; print(torch.xpu.is_available(), torch.xpu.device_count())"
  2. 按 XPU 索引重装 torch(不要装 CUDA 版)
    官方文档给的两条命令:稳定版用 --index-url https://download.pytorch.org/whl/xpu,nightly 用 …/nightly/xpu。另需更新 Intel 显卡驱动;Arc A 系列若用 IPEX 方案则按 Intel 的 whl 索引装配套版本。
    pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/xpu
    pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/xpu
    pip install intel-extension-for-pytorch
  3. 指定设备 / 关掉 IPEX 优化 / 让不支持的算子落回 CPU
    官方 GPU 排障文档给的两个开关:--oneapi-device-selector "level_zero:0" 指定 Intel 设备;--disable-ipex-optimize 关闭 IPEX 优化。issue #4154 里提出该问题的用户给出的临时办法就是:用 Intel 显卡跑 ClipVision 相关节点时切到 CPU 模式,因为 Arc 不支持 bicubic——他改成 CPU 后一切正常。另可参考 Intel 侧的 IPEX issue(intel/intel-extension-for-pytorch#705)。
    python main.py --oneapi-device-selector "level_zero:0"
    python main.py --disable-ipex-optimize
    python main.py --cpu

验证是否修好

torch.xpu.is_available() 返回 True 且 device_count() >= 1;ComfyUI 启动日志显示 XPU 设备而不是 CPU。

补充说明

报错原文逐字取自 Comfy-Org/ComfyUI issue #4154 的正文(本采集已通过 GitHub API 核实,issue 仍 open,2 条评论)。官方文档明确指出 Intel GPU 上出现 Torch not compiled with CUDA enabled 时不要照 NVIDIA 步骤重装,这是本条目与“torch 未编译 CUDA”条目的关键区别。XPU 支持在官方文档中标注为实验性(Experimental support via oneAPI/XPU)。

来源

按可信度排列:官方 issue / 官方文档 > 节点仓库 issue > 社区帖 > 中文社区文章。 链接以纯文本给出(本站不做站外跳转),需要核对时请自行复制到浏览器打开。
  1. [6] (官方文档) How to Troubleshoot and Solve ComfyUI Issues(Intel GPU 问题一节) https://docs.comfy.org/troubleshooting/overview
  2. [215] (官方文档) GPU Troubleshooting - ComfyUI(Intel GPU Issues) https://mintlify.wiki/Comfy-Org/ComfyUI/guides/gpu-troubleshooting
  3. [220] (官方文档) ComfyUI README(Intel GPUs Windows and Linux) https://raw.githubusercontent.com/comfyanonymous/ComfyUI/master/README.md
  4. [221] (官方 issue) fix intel ARC "aten::_upsample_bicubic2d_aa.out" & Flux to cpu · Issue https://github.com/Comfy-Org/ComfyUI/issues/4154

这条报错要用到的东西

按本条报错所属的类别(硬件、驱动、操作系统与非 N 卡环境)列出站内相关的下载包与板块入口。 它们不是「必须下载才能修好」,而是这一类问题里最常要动到的东西;具体怎么做,以上面的解决步骤为准。

环境与依赖配置包依赖版本组合清单 / 环境自检脚本说明 待挂载

同一类别的其他条目

这个解法对你有效吗 记录只存在你自己的浏览器里,不需要注册账号。

返回报错库