Stable Diffusion在Mac上运行时的错误解决-1

Standard

在Mac上用webui.sh运行Stable Diffusion时出现文中最后这大段的错误时,只需要在“终端”中运行“xcode-select –install”,就会安装Xcode的命令行工具更新。安装好后就能正常启动SD了。

解决方法参考自:https://developer.apple.com/forums/thread/673827

错误如下:

################################################################

Launching launch.py…

################################################################

Python 3.10.6 (v3.10.6:9c7b4bd164, Aug  1 2022, 17:13:48) [Clang 13.0.0 (clang-1300.0.29.30)]

Commit hash: <none>

Traceback (most recent call last):

  File “/Users/bianqianwei/Desktop/StableDiffusion/stable-diffusion-webui/launch.py”, line 355, in <module>

    prepare_environment()

  File “/Users/bianqianwei/Desktop/StableDiffusion/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 “/Users/bianqianwei/Desktop/StableDiffusion/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 “/Users/bianqianwei/Desktop/StableDiffusion/stable-diffusion-webui/launch.py”, line 97, in run

    raise RuntimeError(message)

RuntimeError: Couldn’t determine Stable Diffusion’s hash: cf1d67a6fd5ea1aa600c4df58e5b47da45f6bdbf.

Command: “git” -C “/Users/bianqianwei/Desktop/StableDiffusion/stable-diffusion-webui/repositories/stable-diffusion-stability-ai” rev-parse HEAD

Error code: 1

stdout: <empty>

stderr: xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

发表评论

邮箱地址不会被公开。 必填项已用*标注

您可以使用这些HTML标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>