No module named ‘flash_attn_2_cuda’

该报错发生在通过 ComfyUI-Manager 更新 ComfyUI 主程序时,核心原因是本地 Git 仓库缺少用户身份配置,导致 git pull 无法自动提交合并,从而报 “Committer identity unknown”。优先排查 Git 的 user.name 和 user.emai

快速结论:该报错发生在通过 ComfyUI-Manager 更新 ComfyUI 主程序时,核心原因是本地 Git 仓库缺少用户身份配置,导致 git pull 无法自动提交合并,从而报 “Committer identity unknown”。优先排查 Git 的 user.name 和 user.email 是否已配置。

适用环境:Windows 系统,ComfyUI 0.29.x 版本,Python 3.10.6,通过 ComfyUI-Manager 执行更新操作时触发。

最快修复方案:在 ComfyUI 根目录 G:\ComfyUI 下执行 git config user.email "you@example.com"git config user.name "Your Name",然后重新执行 git pull origin master

注意事项:该方案只解决了 Git 身份缺失导致的更新失败;更新后可能还会遇到其他文件冲突,需要另行处理。此外,ComfyUI-Manager 的更新分支是 main,而 ComfyUI 主仓库的分支是 master

问题场景

用户在使用 ComfyUI-Manager 点击 “Update ComfyUI” 时,更新失败。尽管尝试了 git pull origin masterpip install -r requirements 等常见命令,错误依旧。用户随后确认禁用所有自定义节点后问题仍然存在,排除了自定义节点冲突的可能。

报错原文

[2026-08-24 13:01:50.836] [ComfyUI-Manager] Failed to checkout 'master' branch.
repo_path=G:\ComfyUI
Available branches:
[2026-08-24 13:01:50.837] 	master
[2026-08-24 13:01:50.837] **ComfyUI update failed**
[2026-08-24 13:01:50.838] 
[ComfyUI-Manager] Queued works are completed.
{'update-comfyui': 1}
[2026-08-24 13:01:50.838] 
After restarting ComfyUI, please refresh the browser.

手动执行 Git 命令时的核心报错:

Committer identity unknown

*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'User@DESKTOP-xxxxxxx.(none)')

原因分析

可能原因:本地 Git 仓库没有配置用户身份(user.name 和 user.email)。ComfyUI-Manager 在更新时需要执行 Git 合并操作,如果仓库没有身份信息,Git 会拒绝自动提交合并结果,从而报 “Committer identity unknown” 并导致更新失败。

另外,ComfyUI-Manager 自身的更新拉取的是 main 分支,而不是 ComfyUI 主仓库的 master 分支,如果混淆两者,也会出现更新异常。

环境排查

  • 确认 Git 是否已安装并包含在系统 PATH 中。
  • 在 ComfyUI 根目录执行 git config user.namegit config user.email,检查是否为空。
  • 确认 ComfyUI 当前版本为 0.29.x,Python 版本为 3.10.6,系统为 Windows。
  • 确认 ComfyUI-Manager 的远程分支名称是 main 还是 master

解决步骤

  1. 在 ComfyUI 根目录(如 G:\ComfyUI)打开命令行。
  2. 执行 git config user.email "you@example.com",将邮箱替换为你自己的邮箱。
  3. 执行 git config user.name "Your Name",将名字替换为你自己的用户名。
  4. 重新执行 git pull origin master,确认 Git 拉取不再报身份错误。
  5. 如果 Git 报 “untracked working tree files would be overwritten” 的文件冲突(如 comfy/internal_logging.py 等),需要先处理冲突文件,再重新执行更新。
  6. 对于 ComfyUI-Manager 自身的更新,进入 custom_nodes\ComfyUI-Manager 目录,执行 git pull origin main(注意分支是 main 不是 master)。

验证方法

重新打开 ComfyUI-Manager,点击 “Update ComfyUI”,观察是否不再出现 “Failed to checkout ‘master’ branch” 的错误。同时可以检查 ComfyUI 版本号是否已从 0.29.x 更新到最新版本,并在启动日志中确认没有 Git 相关的报错。

参考来源

Comfy-Org/ComfyUI #15869

GamsGo AI

AI 工具推荐

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

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

了解 GamsGo AI

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

这个方案解决了吗?

celebrityanime
celebrityanime
文章: 21308

发表回复

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