報錯信息
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 main
prepare_environment()
File "D:\AI\stable-diffusion-webui\modules\launch_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:\AI\stable-diffusion-webui\modules\launch_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:\AI\stable-diffusion-webui\modules\launch_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:\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()
改成:文章來源:http://www.zghlxwxcb.cn/news/detail-704701.html
current_hash = run(f'"{git}" rev-parse HEAD -C "{dir}"', None, f"Couldn't determine {name}'s hash: {commithash}", live=False).strip()
如果有用記得贊賞一下喲~文章來源地址http://www.zghlxwxcb.cn/news/detail-704701.html
到了這里,關于Stable Diffusion本地部署報錯解決:RuntimeError: Couldn‘t determine Stable Diffusion‘s hash: xxxxxxx的文章就介紹完了。如果您還想了解更多內容,請在右上角搜索TOY模板網以前的文章或繼續(xù)瀏覽下面的相關文章,希望大家以后多多支持TOY模板網!