Batch install/uninstall map every 404 to the “default channel” message, masking the real denial reason

当 ComfyUI 以非回环地址(如 --listen 0.0.0.0 )启动时,批量安装/卸载自定义节点会因回环限制被拒绝,但错误提示被错误地映射为“默认频道(default channel)”限制,同时日志中给出的 allow_git_url_install 提示又与实际状态不符,导致用户无法定

快速结论:当 ComfyUI 以非回环地址(如 --listen 0.0.0.0)启动时,批量安装/卸载自定义节点会因回环限制被拒绝,但错误提示被错误地映射为“默认频道(default channel)”限制,同时日志中给出的 allow_git_url_install 提示又与实际状态不符,导致用户无法定位真实原因。优先检查 ComfyUI 的监听地址是否为回环地址(127.0.0.1/localhost),以及 config.iniallow_git_url_install 的实际配置值。

适用环境:ComfyUI-Manager 3.41(commit d404e623),ComfyUI 启动参数包含 --listen 0.0.0.0config.ini 配置了 security_level = normalallow_git_url_install = True

最快修复方案:暂无确认的一步修复方案。Issue 已通过 #3157 和 #3161 修复,建议将 ComfyUI-Manager 更新到包含这两个 PR 的版本,以获得正确的错误提示。

注意事项:回环限制本身是有意设计(见 #2991),不是缺陷。更新后仍需要将 ComfyUI 的监听地址改为回环地址,或按照新提示调整配置;不要仅依赖 allow_git_url_install 配置项,它只是限制条件之一。

问题场景

用户在 ComfyUI 中使用 Custom Nodes Manager 界面批量安装或卸载节点包时触发。复现环境为:config.ini 中设置了 security_level = normalallow_git_url_install = True,以 python main.py --listen 0.0.0.0 --port 8188 启动 ComfyUI,然后从 Custom Nodes Manager 安装任意不在 custom-node-list.json 中的节点包。

报错原文

Dialog: [Installation Errors] '<pack>': With the current security level configuration, only custom nodes from the "default channel" can be installed.

Log: ERROR: This action requires 'allow_git_url_install = true' in config.ini ([default] section). This setting is independent of security_level.

Batch install/uninstall map every 404 to the "default channel" message, masking the real denial reason

原因分析

这是两个相互叠加的缺陷导致的问题:

  • 客户端把服务器返回的 404 响应体丢弃,强制替换成“默认频道限制”的提示(js/custom-nodes-manager.js:1484js/common.js:667),而真正的拒绝原因(回环地址限制)在 404 响应体中,被完全隐藏。
  • 服务器的日志提示 SECURITY_MESSAGE_FLAG_GIT_URL 只说明了 allow_git_url_install 配置项,但实际的判定条件是“配置项为真”监听地址为回环地址(is_dedicated_install_allowed() 函数,见 glob/manager_server.py:90)。当用户已经设置 allow_git_url_install = True--listen 0.0.0.0 时,日志仍提示去开启一个已开启的配置,形成误导。

可能原因:你实际上是被回环(loopback)限制拦截,而不是安全级别或频道配置问题。更换 security_level 不会改变结果,因为高安全级别走的是 is_dedicated_install_allowed() 分支,不读取 security_level

环境排查

  • 确认 ComfyUI-Manager 版本是否为 3.41 或更早,commit 是否为 d404e623
  • 检查 config.ini(位于 user/__manager/)中 allow_git_url_installsecurity_level 的实际值。
  • 确认 ComfyUI 的启动参数中是否包含 --listen 0.0.0.0 或其他非回环地址。
  • 确认安装的节点包是否在 custom-node-list.json 列表中。

解决步骤

  1. 更新 ComfyUI-Manager 到包含 #3157 和 #3161 修复的版本(最新 main 分支)。这两个 PR 已解决 404 响应体被丢弃和提示信息缺失回环要求的问题。
  2. 若无法立即更新,可先检查启动参数:确认 --listen 是否为 127.0.0.1localhostallow_git_url_install = True 只有在回环地址下才生效。
  3. 如果确实需要远程访问 ComfyUI(非回环监听),批量安装 git 节点将无法通过,只能通过其他方式(如手动安装或改用非 git 安装源)绕过。
  4. 在更新后重试批量安装,观察新提示是否明确说明“Install via git URL requires allow_git_url_install = true AND ComfyUI listening on a loopback address(当前为 0.0.0.0)”。

验证方法

更新到修复版本后,重复同样的批量安装操作。如果提示信息不再显示“default channel”,而是明确给出实际的拒绝原因(如回环地址要求),且日志中的提示与当前配置状态一致,则问题已解决。对于旧版本,临时验证方法是:将 --listen 改为 127.0.0.1 后重试,若安装成功则确认是回环限制导致。

参考来源

ltdrdata/ComfyUI-Manager #3128

GamsGo AI

AI 工具推荐

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

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

了解 GamsGo AI

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

这个方案解决了吗?

celebrityanime
celebrityanime
文章: 18556

发表回复

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