当前位置:   article > 正文

Stable Diffusion本地部署报错解决:RuntimeError: Couldn‘t determine Stable Diffusion‘s hash: xxxxxxx_runtimeerror: couldn't fetch stable diffusion.

runtimeerror: couldn't fetch stable diffusion.

报错信息

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
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16

升级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()
  • 1

在这里插入图片描述
改成:

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

在这里插入图片描述
如果有用记得赞赏一下哟~

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家自动化/article/detail/539339
推荐阅读
相关标签
  

闽ICP备14008679号