AUTOMATIC1111 / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
139.5k stars 26.44k forks source link

[Bug]: RuntimeError: Couldn't clone Stable Diffusion. #14233

Open lednevandrey04 opened 9 months ago

lednevandrey04 commented 9 months ago

Is there an existing issue for this?

What happened?

After unpacking the sd.webui.zip archive and running run.bat for the first time...

Steps to reproduce the problem

  1. Go to D:\AI\SD\stable-diffusion-webui
  2. Press run.bat
  3. ...

What should have happened?

must be cloning

Sysinfo

Ferst launch ...

What browsers do you use to access the UI ?

Google Chrome

Console logs

Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Commit hash: 48a15821de768fea76e66f26df83df3fddf18f4b
Cloning Stable Diffusion into repositories\stable-diffusion-stability-ai...
Traceback (most recent call last):
  File "D:\AI\SD\stable-diffusion-webui\webui\launch.py", line 324, in <module>
    prepare_environment()
  File "D:\AI\SD\stable-diffusion-webui\webui\launch.py", line 264, in prepare_environment
    git_clone(stable_diffusion_repo, repo_dir('stable-diffusion-stability-ai'), "Stable Diffusion", stable_diffusion_commit_hash)
  File "D:\AI\SD\stable-diffusion-webui\webui\launch.py", line 128, in git_clone
    run(f'"{git}" clone "{url}" "{dir}"', f"Cloning {name} into {dir}...", f"Couldn't clone {name}")
  File "D:\AI\SD\stable-diffusion-webui\webui\launch.py", line 74, in run
    raise RuntimeError(message)
RuntimeError: Couldn't clone Stable Diffusion.
Command: "git" clone "https://github.com/Stability-AI/stablediffusion.git" "repositories\stable-diffusion-stability-ai"
Error code: 128
stdout: <empty>
stderr: Cloning into 'repositories\stable-diffusion-stability-ai'...
error: RPC failed; curl 92 HTTP/2 stream 0 was not closed cleanly: CANCEL (err 8)
error: 3216 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output

Additional information

???

w-e-w commented 9 months ago

unexpected disconnect while reading sideband packet

most likely you're experiencing some sort of network issue on your end it is not a bug of webui

furthermore you clearly haven't read the wiki or the instructions on read me which would tell you to update sd.webui.zip

not that updating would help if the networking issue still persist

ttristan commented 8 months ago

Same issue here on M1 MacBook Air. I have no network issues. I had the same issue cloning the stable-diffusion-webui repo.

This helped me: https://stackoverflow.com/questions/21277806/fatal-early-eof-fatal-index-pack-failed

Therefore I ran:

git clone --depth 1 https://github.com/Stability-AI/stablediffusion.git <path to stable-diffusion-webui repo>/repositories/stable-diffusion-stability-ai

then it worked

hotdogarea commented 6 months ago

It's not a bug in the program, it's caused by unstable network. Just re execute webui.bat! The problem is solved

Hosseinrashedi72 commented 1 month ago

Hello, sorry, can anyone guide me to fix this error during the installation of stable diffusion, the error that came to me. RuntimeError: Couldn't clone Stable Diffusion. How can I solve this? I would be grateful if someone could guide me. Thanks.

sandeepkrs commented 1 hour ago

Hi, If anyone still facing this issue. Here is the solution that worked for me. Above solutions did not worked.

With git command it was always failing with this error:

  File "D:\repos\stable-diffusion-webui\modules\launch_utils.py", line 116, in run
    raise RuntimeError("\n".join(error_bits))
RuntimeError: Couldn't clone Stable Diffusion.
Command: ""C:\Users\####\AppData\Local\Atlassian\SourceTree\git_local\bin\git.exe"" clone --config core.filemode=false"https://github.com/Stability-AI/stablediffusion.git" "D:\repos\stable-diffusion-webui\repositories\stable-diffusion-stability-ai"
Error code: 128
Press any key to continue . . .

I tried cloning the repo myself using git so that I can paste it manually in stable-diffusion-webui but there also I got error something like... unexpected End of file received while more data was expected.

So, I tried this and it Worked:

Finally, I am able to complete the setup after this.