报错信息
Commit hash: c9c8485bc1e8720aba70f029d25cba1c4abf2b5c
Traceback (most recent call last):
File "D:AIstable-diffusion-webuilaunch.py", line 39, in module>
main()
File "D:AIstable-diffusion-webuilaunch.py", line 30, in main
prepare_environment()
File "D:AIstable-diffusion-webuimoduleslaunch_utils.py", line 345, in prepare_environment
git_clone(stable_diffusion_repo, repo_dir('stable-diffusion-stability-ai'), "Stable Diffusion", stable_diffusion_commit_hash)
File "D:AIstable-diffusion-webuimoduleslaunch_utils.py", line 151, in git_clone
current_hash = run(f'"{git}" -C "{dir}" rev-parse HEAD', None, f"Couldn't determine {name}'s hash: {commithash}", live=False).strip()
File "D:AIstable-diffusion-webuimoduleslaunch_utils.py", line 113, in run
raise RuntimeError("n".join(error_bits))
RuntimeError: Couldn't determine Stable Diffusion's hash: cf1d67a6fd5ea1aa600c4df58e5b47da45f6bdbf.
Command: "git" -C "D:AIstable-diffusion-webuirepositoriesstable-diffusion-stability-ai" rev-parse HEAD
Error code: 128
stdout: HEAD
升级git版本等都没有解决的话,看这里!
解决
找到stable-diffusion-webuimoduleslaunch_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 hash: xxxxxxx
相关推荐: AI绘画之网上大火的 “隐藏字” 效果怎么制作?只需 5 步教会你!
大家好,我是灵魂画师向阳 一、什么是“隐藏字”? 废话不多说,上图! 我不说,你能看出来这张图片有字吗? 很多人可能觉得不可思议,这张图哪来的字啊?就一张正常的图而已。而有些人可能依稀觉得是有文字的,但是又说不出来到底是什么。 让我们换种方式看这张图片,我们眯…
5bei.cn大模型教程网










