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

猴年到

Standard

第一年带老婆回家过除夕,包了一下午饺子,累了都去眯着了。

羊年家里也是有大事发生的。比如郓城搬到了有地暖的新家,每天醒来第一个想说的字就是热,尽管家的地点换了换,但有爸妈在,哪里都是家;比如上海搬进了装修好的新家,每到阳光充盈进屋里,那种暖暖的感觉清新中带着安定;比如结婚了,迎娶了一枚独立自主的新时代女性,她的笑于我是最舒贴的,在很多时刻想到的只有她;比如跳槽了,从让我如何不爱的腾讯到了朋友的创业公司,和孔方兄直接交道,跨界成长带来源源的动力,责任感也秒进了前卫词典的首页。

灵动的猴年跩起来!本命年前的一年,好好过。