Error occurred when executing IPAdapter: insightface model is required for FaceID models

用户在 RunPod 上使用 ComfyUI 及 ComfyUI_IPAdapter_plus 自定义节点,配置了 FaceID 模型、LoRA 等文件,并通过 pip install insightface 安装了 insightface 包。在运行 FaceID 相关节点(如 IPAdapter

Error occurred when executing IPAdapter: insightface model is required for FaceID models

Error occurred when executing IPAdapter: insightface model is required for FaceID models

快速结论:此报错通常在使用 ComfyUI IPAdapter Plus 的 FaceID 节点时触发,但 insightface 依赖未能被正确加载。优先排查:重启 ComfyUI、通过 ComfyUI Manager 安装依赖、或手动下载 insightface 模型文件。

问题场景

用户在 RunPod 上使用 ComfyUI 及 ComfyUI_IPAdapter_plus 自定义节点,配置了 FaceID 模型、LoRA 等文件,并通过 pip install insightface 安装了 insightface 包。在运行 FaceID 相关节点(如 IPAdapter FaceID 节点)时触发此报错。

报错原文

Error occurred when executing IPAdapter:

insightface model is required for FaceID models

File "/workspace/ComfyUI/execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "/workspace/ComfyUI/execution.py", line 81, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
File "/workspace/ComfyUI/execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "/workspace/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus/IPAdapterPlus.py", line 569, in apply_ipadapter
return (ipadapter_execute(model.clone(), ipadapter['ipadapter']['model'], ipadapter['clipvision']['model'], **ipa_args), )
File "/workspace/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus/IPAdapterPlus.py", line 181, in ipadapter_execute
raise Exception("insightface model is required for FaceID models")

原因分析

该报错由 ComfyUI_IPAdapter_plus/IPAdapterPlus.py 第 180-181 行抛出:当 is_faceid 为 True 且 insightface 变量为假值时触发。可能原因包括:

  • insightface 包已安装,但 ComfyUI 运行时未能正确识别或加载该依赖(例如在启动 ComfyUI 后才安装依赖)。
  • insightface 需要额外的模型文件(如 buffalo_l 模型),这些文件未自动下载或缺失。
  • 错误的节点类型:FaceID 模型必须使用专用的 FaceID IPAdapter 节点,而不是普通 IPAdapter 节点。
  • 运行环境(RunPod)中 Python 环境与 ComfyUI 使用的环境不一致,导致 pip 安装的包未生效。

环境排查

  • 确认使用了正确的节点类型:FaceID 模型需要使用 IPAdapter FaceID 节点,而非普通 IPAdapter 节点。
  • 检查 Python 环境:确认 ComfyUI 启动时使用的 Python 解释器中安装了 insightface。
  • 检查 insightface 模型文件:insightface 需要下载 buffalo_l 等模型,首次使用时会自动下载到 ~/.insightface/models/ 目录。
  • (RunPod 特定)确认使用的模板和网络卷配置正确,依赖安装需要持久化。

解决步骤

  1. 重启 ComfyUI:如果在 ComfyUI 运行期间安装了 insightface 或相关包,请完全重启 ComfyUI 使其重新加载依赖。
  2. 通过 ComfyUI Manager 安装依赖(可优先尝试):
    • 打开 ComfyUI Manager
    • 点击 “Install PIP Packages” 按钮
    • 输入以下命令并安装:pip install pillow==10.2.0 insightface onnxruntime onnxruntime-gpu
  3. 手动安装 insightface 模型文件:部分用户报告即使安装了 insightface 包,模型文件也可能缺失。解决方案是手动下载 insightface 模型(如 buffalo_l)到 ~/.insightface/models/ 目录。
  4. 检查节点类型:确认在 ComfyUI 工作流中使用的是 IPAdapter FaceID 节点,而不是普通的 IPAdapter 节点。
  5. (RunPod 特定)使用正确的模板:如果使用 RunPod,推荐使用 ghcr.io/ai-dock/comfyui:latestghcr.io/ai-dock/comfyui:latest-jupyter 模板,并确保依赖安装到持久化环境(如网络卷)。

验证方法

重启 ComfyUI 后,重新执行包含 IPAdapter FaceID 节点的工作流。如果不再出现 “insightface model is required for FaceID models” 错误,且节点正常执行,则问题已解决。也可以通过 ComfyUI 启动日志检查 insightface 是否被成功加载(无相关警告或错误)。

参考来源

cubiq/ComfyUI_IPAdapter_plus #401

GamsGo AI

AI 工具推荐

想把多个 AI 模型放在一个入口?

GamsGo AI 集成 ChatGPT、DeepSeek、Gemini、Claude、Midjourney、Veo 等常用模型,适合写作、绘图、视频和日常 AI 工作流。

了解 GamsGo AI

推广链接:通过此链接购买,我可能获得佣金,不影响你的价格。

celebrityanime
celebrityanime
文章: 8329

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注