处理stable-diffusion-webui本地部署过程中的commit hash <none>问题的一个方法
•
算法结构
安装webui时一直卡在commit hash none RuntimeError: Couldn’t determine Stable Diffusion’s hash: 69ae4b35e0a0f6ee1af8bb9a5d0016ccb27e36dc 这一步
报错类似于这个(因为我没有存截图)
Commit hash:
Traceback (most recent call last):
File "D:\GitHub Desktop Files\stable-diffusion-webui\launch.py", line 130, in
git_clone("https://github.com/CompVis/stable-diffusion.git", repo_dir('stable-diffusion'), "Stable Diffusion", stable_diffusion_commit_hash)
File "D:\GitHub Desktop Files\stable-diffusion-webui\launch.py", line 93, in git_clone
current_hash = run(f'"{git}" -C {dir} rev-parse HEAD', None, f"Couldn't determine {name}'s hash: {commithash}").strip()
File "D:\GitHub Desktop Files\stable-diffusion-webui\launch.py", line 55, in run
raise RuntimeError(message)
RuntimeError: Couldn't determine Stable Diffusion's hash: 69ae4b35e0a0f6ee1af8bb9a5d0016ccb27e36dc.
Command: "git" -C repositories\stable-diffusion rev-parse HEAD
Error code: 1
stdout: 69ae4b35e0a0f6ee1af8bb9a5d0016ccb27e36dc

我尝试了很多安装方法,但没有解决
直到我打开cmd尝试输入RuntimeError下一行的command

按照command输入了几次之后,可以正常使用

所以,我的一个解决方法是
根据报错内容下方command提示,依次在命令行如下输入(文件路径为自己相应文件的)
C:\Users\86152>git config --global --add safe.directory E:/E-software/AIPaint/WebUi/repositories/stable-diffusion C:\Users\86152>git config --global --add safe.directory E:/E-software/AIPaint/WebUi/repositories/taming-transformers C:\Users\86152>git config --global --add safe.directory E:/E-software/AIPaint/WebUi/repositories/k-diffusion C:\Users\86152>git config --global --add safe.directory E:/E-software/AIPaint/WebUi/repositories/CodeFormer C:\Users\86152>git config --global --add safe.directory E:/E-software/AIPaint/WebUi/repositories/BLIP
另外,安装过程中我发现这个包相当好用
【【AI绘画】NovelAI最终版 webui版 无需额外下载安装!汉化✓ 可更新✓ 训练✓ 提供7G模型】(记得给up留个三连)
里面的报错修复修复了我遇到的另外一些问题
本文来自网络,不代表协通编程立场,如若转载,请注明出处:https://net2asp.com/3d223a8f3e.html
