Stable Diffusion本地部署报错解决:RuntimeError: Couldn‘t determine Stable Diffusion‘s hash: xxxxxxx

编程入门 行业动态 更新时间:2024-10-24 19:28:34

Stable Diffusion本地部署<a href=https://www.elefans.com/category/jswz/34/1771188.html style=报错解决:RuntimeError: Couldn‘t determine Stable Diffusion‘s hash: xxxxxxx"/>

Stable Diffusion本地部署报错解决:RuntimeError: Couldn‘t determine Stable Diffusion‘s hash: xxxxxxx

报错信息

Commit hash: c9c8485bc1e8720aba70f029d25cba1c4abf2b5c
Traceback (most recent call last):File "D:\AI\stable-diffusion-webui\launch.py", line 39, in <module>main()File "D:\AI\stable-diffusion-webui\launch.py", line 30, in mainprepare_environment()File "D:\AI\stable-diffusion-webui\modules\launch_utils.py", line 345, in prepare_environmentgit_clone(stable_diffusion_repo, repo_dir('stable-diffusion-stability-ai'), "Stable Diffusion", stable_diffusion_commit_hash)File "D:\AI\stable-diffusion-webui\modules\launch_utils.py", line 151, in git_clonecurrent_hash = run(f'"{git}" -C "{dir}" rev-parse HEAD', None, f"Couldn't determine {name}'s hash: {commithash}", live=False).strip()File "D:\AI\stable-diffusion-webui\modules\launch_utils.py", line 113, in runraise RuntimeError("\n".join(error_bits))
RuntimeError: Couldn't determine Stable Diffusion's hash: cf1d67a6fd5ea1aa600c4df58e5b47da45f6bdbf.
Command: "git" -C "D:\AI\stable-diffusion-webui\repositories\stable-diffusion-stability-ai" rev-parse HEAD
Error code: 128
stdout: HEAD

升级git版本等都没有解决的话,看这里!

解决

找到stable-diffusion-webui\modules\launch_utils.py,打开,搜索current_hash(当前是第151行):
原内容:

current_hash = run(f'"{git}" -C "{dir}" rev-parse HEAD', None, f"Couldn't determine {name}'s hash: {commithash}", live=False).strip()


改成:

current_hash = run(f'"{git}" rev-parse HEAD -C "{dir}"', None, f"Couldn't determine {name}'s hash: {commithash}", live=False).strip()


如果有用记得赞赏一下哟~

更多推荐

Stable Diffusion本地部署报错解决:RuntimeError: Couldn‘t determine Stable Diffusion‘s has

本文发布于:2024-02-25 22:03:56,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1700434.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:报错   Diffusion   Stable   RuntimeError   xxxxxxx

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!