一开始的安装我就不说了,有空去看我之前的那篇:https://www.bilibili.com/read/cv22932989
异常问题:超时下载资源
下载资源文件报错异常,例如:
Python 3.10.10 (main, Feb 16 2023, 02:49:39) [Clang 14.0.0 (clang-1400.0.29.202)]
Commit hash: 22bcc7be428c94e9408f589966c2040187245d81
Cloning Stable Diffusion into /Users/mac/my-project/stable-diffusion-webui/repositories/stable-diffusion-stability-ai...
Cloning Taming Transformers into /Users/mac/my-project/stable-diffusion-webui/repositories/taming-transformers...
Traceback (most recent call last):
File "/Users/mac/my-project/stable-diffusion-webui/launch.py", line 355, in <module>
prepare_environment()
File "/Users/mac/my-project/stable-diffusion-webui/launch.py", line 289, in prepare_environment
git_clone(taming_transformers_repo, repo_dir('taming-transformers'), "Taming Transformers", taming_transformers_commit_hash)
File "/Users/mac/my-project/stable-diffusion-webui/launch.py", line 151, in git_clone
run(f'"{git}" clone "{url}" "{dir}"', f"Cloning {name} into {dir}...", f"Couldn't clone {name}")
File "/Users/mac/my-project/stable-diffusion-webui/launch.py", line 97, in run
raise RuntimeError(message)
RuntimeError: Couldn't clone Taming Transformers.
Command: "git" clone "https://ghproxy.com/https://github.com/CompVis/taming-transformers.git" "/Users/mac/my-project/stable-diffusion-webui/repositories/taming-transformers"
Error code: 128
stdout: <empty>
stderr: 正克隆到 '/Users/mac/my-project/stable-diffusion-webui/repositories/taming-transformers'...
错误:RPC 失败。curl 56 Recv failure: Connection reset by peer
错误:预期仍然需要 5787 个字节的正文
fetch-pack: unexpected disconnect while reading sideband packet
致命错误:过早的文件结束符(EOF)
致命错误:fetch-pack:无效的 index-pack 输出
由于异常我们可以发现它是下载仓库资源,导致下载失败。
就算我们把项目下launch.py文件中的下载地址改了,但有时候还是会很慢甚至超时,所以这里我们可以手动下载资源文件。
我们先确定我需要下载几个资源文件包
步骤如下:
先找到项目下的这个仓库文件夹repositories(路径看我上文截图),然后你右击鼠标进入命令终端窗口。执行命令的路径一定不要错哦
依次执行如下命令:
(1)输入git clone https://github.com/Stability-AI/stablediffusion.git
(2)输入git clone https://github.com/CompVis/taming-transformers.git
(3)输入git clone https://github.com/crowsonkb/k-diffusion.git
(4)输入git clone https://github.com/sczhou/CodeFormer.git
(5)输入git clone https://github.com/salesforce/BLIP.git
命令操作如下:
5个命令执行完后之后,在repositories文件中就会下载生成对应的5个资源包了,我们这时再去启动项目就不会再去下下载文件,接下来它就会顺利的启动完成了。
麦当别跟我抢 2023-05-24
Beilife 2023-04-14
龙背村88号 2024-03-01