错误

Python 3.10.10 (main, Mar 21 2023, 18:45:11) [GCC 11.2.0] Commit hash: Traceback (most recent call last): File “/home/xxxxx/PycharmProjects/stable-diffusion-webui/launch.py”, line 355, in prepare_environment() File “/home/xxxx/PycharmProjects/stable-diffusion-webui/launch.py”, line 288, in prepare_environment git_clone(stable_diffusion_repo, repo_dir(‘stable-diffusion-stability-ai’), “Stable Diffusion”, stable_diffusion_commit_hash) File “/home/xxxxx/PycharmProjects/stable-diffusion-webui/launch.py”, line 143, in git_clone current_hash = run(f’“{git}” -C “{dir}” rev-parse HEAD’, None, f"Couldn’t determine {name}'s hash: {commithash}").strip() File “/home/xxxx/PycharmProjects/stable-diffusion-webui/launch.py”, line 97, in run raise RuntimeError(message) RuntimeError: Couldn’t determine Stable Diffusion’s hash: cf1d67a6fd5ea1aa600c4df58e5b47da45f6bdbf.

stderr: fatal: 有歧义的参数 'HEAD':未知的版本或路径不存在于工作区中。

使用 ‘–’ 来分隔版本和路径,例如: ‘git <命令> [<版本>…] – [<文件>…]’

造成原因

因为使用ubuntu 梯子不能全局 ,导致git下载 stable diffusion 出错,使用zip下载并解压造成。

解决方案

在stable-diffusion-webui/repoitories 文件中打开终端 输入

git clone https://github.com/Stability-AI/stablediffusion.git

并将下载的文件夹重命名成 stable-diffusion-stability-ai 重新运行python launch.py

推荐阅读

评论可见,请评论后查看内容,谢谢!!!
 您阅读本篇文章共花了: