AUTOMATIC1111 / stable-diffusion-webui

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

[Bug]: install gets stuck on "Cloning Stable Diffusion into repositories\stable-diffusion..." #3261

Open Wladdie opened 2 years ago

Wladdie commented 2 years ago

Is there an existing issue for this?

What happened?

When i start the webui-user.bat everything works fine until it gets to the step where it should clone the SD repos Someone told me that running the batch file from cmd could fix this but it didnt work for me I already tried letting it run over night and it didnt help

I had a problem before that where it couldnt find python and git but after setting the path in the file it worked

Steps to reproduce the problem

  1. Go to stable-diffusion-webui-master directory
  2. doubleclick the webui-user.bat
  3. wait until it gets to the cloning step

What should have happened?

It should clone the repo and proceed with the installation

Commit where the problem happens

No response

What platforms do you use to access UI ?

Windows

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

none

Additional information, context and logs

Ive got a Win 10 PC with Geforce 1060 6GB 32GB ram Ryzen 5 2600x 3,6 GHz

pcgreen-john commented 2 years ago

Similar problem. Trying to install on a GTX 960 with 2GB VRAM (i7 2600, 16GB RAM, Win 10) I had to add --medvram --skip-torch-cuda-test to proceed with the installation as suggested from the script.

Then I had to run e:\SD\stable-diffusion-webui\venv\Scripts\python.exe -m pip install --upgrade pip as again suggested by the installation script.

Running it for the third time, it halts here:

e:\SD\stable-diffusion-webui>webui-user.bat venv "e:\SD\stable-diffusion-webui\venv\Scripts\Python.exe" Python 3.10.8 (tags/v3.10.8:aaaf517, Oct 11 2022, 16:50:30) [MSC v.1933 64 bit (AMD64)] Commit hash: Cloning Stable Diffusion into repositories\stable-diffusion... Traceback (most recent call last): File "e:\SD\stable-diffusion-webui\launch.py", line 205, in prepare_enviroment() File "e:\SD\stable-diffusion-webui\launch.py", line 179, in prepare_enviroment git_clone(stable_diffusion_repo, repo_dir('stable-diffusion'), "Stable Diffusion", stable_diffusion_commit_hash) File "e:\SD\stable-diffusion-webui\launch.py", line 84, in git_clone run(f'"{git}" clone "{url}" "{dir}"', f"Cloning {name} into {dir}...", f"Couldn't clone {name}") File "e:\SD\stable-diffusion-webui\launch.py", line 33, in run raise RuntimeError(message) RuntimeError: Couldn't clone Stable Diffusion. Command: "git" clone "https://github.com/CompVis/stable-diffusion.git" "repositories\stable-diffusion" Error code: 1 stdout: stderr: '0' is not recognized as an internal or external command, operable program or batch file. Cloning into 'repositories\stable-diffusion'...

bran112299 commented 2 years ago

same issue

Commit hash: Cloning Stable Diffusion into repositories\stable-diffusion... Traceback (most recent call last): File "Z:\Downloads\Stable Diffusion\november\stable-diffusion-webui\launch.py", line 205, in prepare_enviroment() File "Z:\Downloads\Stable Diffusion\november\stable-diffusion-webui\launch.py", line 179, in prepare_enviroment git_clone(stable_diffusion_repo, repo_dir('stable-diffusion'), "Stable Diffusion", stable_diffusion_commit_hash) File "Z:\Downloads\Stable Diffusion\november\stable-diffusion-webui\launch.py", line 84, in git_clone run(f'"{git}" clone "{url}" "{dir}"', f"Cloning {name} into {dir}...", f"Couldn't clone {name}") File "Z:\Downloads\Stable Diffusion\november\stable-diffusion-webui\launch.py", line 33, in run raise RuntimeError(message) RuntimeError: Couldn't clone Stable Diffusion. Command: "git" clone "https://github.com/CompVis/stable-diffusion.git" "repositories\stable-diffusion" Error code: 1 stdout: stderr: The system cannot find the path specified. Cloning into 'repositories\stable-diffusion'...

then rerunning

Python 3.10.5 (tags/v3.10.5:f377153, Jun 6 2022, 16:14:13) [MSC v.1929 64 bit (AMD64)] Commit hash: Traceback (most recent call last): File "Z:\Downloads\Stable Diffusion\november\stable-diffusion-webui\launch.py", line 205, in prepare_enviroment() File "Z:\Downloads\Stable Diffusion\november\stable-diffusion-webui\launch.py", line 179, in prepare_enviroment git_clone(stable_diffusion_repo, repo_dir('stable-diffusion'), "Stable Diffusion", stable_diffusion_commit_hash) File "Z:\Downloads\Stable Diffusion\november\stable-diffusion-webui\launch.py", line 76, in git_clone current_hash = run(f'"{git}" -C {dir} rev-parse HEAD', None, f"Couldn't determine {name}'s hash: {commithash}").strip() File "Z:\Downloads\Stable Diffusion\november\stable-diffusion-webui\launch.py", line 33, in run raise RuntimeError(message) RuntimeError: Couldn't determine Stable Diffusion's hash: 69ae4b35e0a0f6ee1af8bb9a5d0016ccb27e36dc. Command: "git" -C repositories\stable-diffusion rev-parse HEAD Error code: 1 stdout: 69ae4b35e0a0f6ee1af8bb9a5d0016ccb27e36dc

stderr: The system cannot find the path specified.

Press any key to continue . . .

Hemin99 commented 1 year ago

Does anyone know how to fix the problem of: RuntimeError: Couldn't clone Stable Diffusion.?

OrugenZero commented 1 year ago

Had this problem. it seems the problem is with your git installation or path, maybe try reinstalling it.

For me, I just had to delete the manual git path I had added to my webui-user.bat and put an entry for git in my windows PATH.

forgive me if this doesn't sound right, I'm a newb, but it worked for me

Hades-Su commented 1 year ago

Wait for it a while longer. I waited a long time and finally succeeded, or replace it with your own git in webui-user.bat.

Wackdonalds commented 1 year ago

Sorry if i sound stupid as I know nothing about Pc's or coding and all that. What does it mean to "put an entry for git in my windows PATH" ?

Saktisampad02 commented 1 year ago

same problem RuntimeError: Couldn't clone Stable Diffusion.

BlueCatWang commented 1 year ago

Had the same problem. Installing Git on my windows solved the issue.

githubfbw commented 1 year ago

same issue. windows11 and RTX 4090

the feedback is:

Python 3.10.6 | packaged by conda-forge | (main, Oct 24 2022, 16:02:16) [MSC v.1916 64 bit (AMD64)] Version: ## 1.4.1 Commit hash: Cloning Stable Diffusion into D:\envs\stable-diffusion-webui-master\repositories\stable-diffusion-stability-ai... Traceback (most recent call last): File "D:\envs\stable-diffusion-webui-master\launch.py", line 38, in main() File "D:\envs\stable-diffusion-webui-master\launch.py", line 29, in main prepare_environment() File "D:\envs\stable-diffusion-webui-master\modules\launch_utils.py", line 299, in prepare_environment git_clone(stable_diffusion_repo, repo_dir('stable-diffusion-stability-ai'), "Stable Diffusion", stable_diffusion_commit_hash) File "D:\envs\stable-diffusion-webui-master\modules\launch_utils.py", line 153, in git_clone run(f'"{git}" clone "{url}" "{dir}"', f"Cloning {name} into {dir}...", f"Couldn't clone {name}") File "D:\envs\stable-diffusion-webui-master\modules\launch_utils.py", line 107, in run raise RuntimeError("\n".join(error_bits)) RuntimeError: Couldn't clone Stable Diffusion. Command: "git" clone "https://github.com/Stability-AI/stablediffusion.git" "D:\envs\stable-diffusion-webui-master\repositories\stable-diffusion-stability-ai" Error code: 1 stderr: '"git"' ڲⲿҲǿеij ļ

GoXLd commented 1 year ago

Does anyone know how to fix the problem of: RuntimeError: Couldn't clone Stable Diffusion.?

https://git-scm.com/download/win

GoXLd commented 1 year ago

same issue. windows11 and RTX 4090

the feedback is:

Python 3.10.6 | packaged by conda-forge | (main, Oct 24 2022, 16:02:16) [MSC v.1916 64 bit (AMD64)] Version: ## 1.4.1 Commit hash: Cloning Stable Diffusion into D:\envs\stable-diffusion-webui-master\repositories\stable-diffusion-stability-ai... Traceback (most recent call last): File "D:\envs\stable-diffusion-webui-master\launch.py", line 38, in main() File "D:\envs\stable-diffusion-webui-master\launch.py", line 29, in main prepare_environment() File "D:\envs\stable-diffusion-webui-master\modules\launch_utils.py", line 299, in prepare_environment git_clone(stable_diffusion_repo, repo_dir('stable-diffusion-stability-ai'), "Stable Diffusion", stable_diffusion_commit_hash) File "D:\envs\stable-diffusion-webui-master\modules\launch_utils.py", line 153, in git_clone run(f'"{git}" clone "{url}" "{dir}"', f"Cloning {name} into {dir}...", f"Couldn't clone {name}") File "D:\envs\stable-diffusion-webui-master\modules\launch_utils.py", line 107, in run raise RuntimeError("\n".join(error_bits)) RuntimeError: Couldn't clone Stable Diffusion. Command: "git" clone "https://github.com/Stability-AI/stablediffusion.git" "D:\envs\stable-diffusion-webui-master\repositories\stable-diffusion-stability-ai" Error code: 1 stderr: '"git"' ڲⲿҲǿеij ļ

Looks like you all here have some troubles with Git not with SD https://git-scm.com/download/win Thanks!

githubfbw commented 1 year ago

First, thank you for your reply. But when I get git already, the issue is still here. attached issue screenprint:

The Chinese means: Found Git [Git.Git] version 2.41.0.2 This application is licensed to you by its owner. Microsoft is not responsible for and does not grant any licenses to third-party packages.

Successfully verified the installer hash Starting package installation... The installer will request to run as an administrator and will need to be prompted. Successfully installed

重尘 @.***

 

------------------ 原始邮件 ------------------ 发件人: "AUTOMATIC1111/stable-diffusion-webui" @.>; 发送时间: 2023年7月21日(星期五) 晚上11:18 @.>; @.**@.>; 主题: Re: [AUTOMATIC1111/stable-diffusion-webui] [Bug]: install gets stuck on "Cloning Stable Diffusion into repositories\stable-diffusion..." (Issue #3261)

same issue. windows11 and RTX 4090

the feedback is:

Python 3.10.6 | packaged by conda-forge | (main, Oct 24 2022, 16:02:16) [MSC v.1916 64 bit (AMD64)] Version: ## 1.4.1 Commit hash: Cloning Stable Diffusion into D:\envs\stable-diffusion-webui-master\repositories\stable-diffusion-stability-ai... Traceback (most recent call last): File "D:\envs\stable-diffusion-webui-master\launch.py", line 38, in main() File "D:\envs\stable-diffusion-webui-master\launch.py", line 29, in main prepare_environment() File "D:\envs\stable-diffusion-webui-master\modules\launch_utils.py", line 299, in prepare_environment git_clone(stable_diffusion_repo, repo_dir('stable-diffusion-stability-ai'), "Stable Diffusion", stable_diffusion_commit_hash) File "D:\envs\stable-diffusion-webui-master\modules\launch_utils.py", line 153, in git_clone run(f'"{git}" clone "{url}" "{dir}"', f"Cloning {name} into {dir}...", f"Couldn't clone {name}") File "D:\envs\stable-diffusion-webui-master\modules\launch_utils.py", line 107, in run raise RuntimeError("\n".join(error_bits)) RuntimeError: Couldn't clone Stable Diffusion. Command: "git" clone "https://github.com/Stability-AI/stablediffusion.git" "D:\envs\stable-diffusion-webui-master\repositories\stable-diffusion-stability-ai" Error code: 1 stderr: '"git"' ڲⲿҲǿеij ļ

Looks like you all here have some troubles with Git not with SD https://git-scm.com/download/win Thanks!

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

udayadams2 commented 1 year ago

same issue. windows11 and RTX 4090 the feedback is: Python 3.10.6 | packaged by conda-forge | (main, Oct 24 2022, 16:02:16) [MSC v.1916 64 bit (AMD64)] Version: ## 1.4.1 Commit hash: Cloning Stable Diffusion into D:\envs\stable-diffusion-webui-master\repositories\stable-diffusion-stability-ai... Traceback (most recent call last): File "D:\envs\stable-diffusion-webui-master\launch.py", line 38, in main() File "D:\envs\stable-diffusion-webui-master\launch.py", line 29, in main prepare_environment() File "D:\envs\stable-diffusion-webui-master\modules\launch_utils.py", line 299, in prepare_environment git_clone(stable_diffusion_repo, repo_dir('stable-diffusion-stability-ai'), "Stable Diffusion", stable_diffusion_commit_hash) File "D:\envs\stable-diffusion-webui-master\modules\launch_utils.py", line 153, in git_clone run(f'"{git}" clone "{url}" "{dir}"', f"Cloning {name} into {dir}...", f"Couldn't clone {name}") File "D:\envs\stable-diffusion-webui-master\modules\launch_utils.py", line 107, in run raise RuntimeError("\n".join(error_bits)) RuntimeError: Couldn't clone Stable Diffusion. Command: "git" clone "https://github.com/Stability-AI/stablediffusion.git" "D:\envs\stable-diffusion-webui-master\repositories\stable-diffusion-stability-ai" Error code: 1 stderr: '"git"' ڲⲿҲǿеij ļ

Looks like you all here have some troubles with Git not with SD https://git-scm.com/download/win Thanks!

Thank you for sharing info with others, I have installed the latest git version and the error keeps popping up, what else you think it might be? thank you

Xjkvest commented 1 year ago

I was running into the same issue and the only thing that helped was me installing both the 32 and 64 bit versions and then running Command Prompt as administrator. I'm not sure which of them helped, but I was successful

r3dbullxxx commented 1 year ago

same issues...have tried everything mentioned....

(base) C:\Users\jonat\StableDiffusion1\stable-diffusion-webui>webui-user.bat venv "C:\Users\jonat\StableDiffusion1\stable-diffusion-webui\venv\Scripts\Python.exe"

INCOMPATIBLE PYTHON VERSION

This program is tested with 3.10.6 Python, but you have 3.11.5. If you encounter an error with "RuntimeError: Couldn't install torch." message, or any other error regarding unsuccessful package (library) installation, please downgrade (or upgrade) to the latest version of 3.10 Python and delete current Python and "venv" folder in WebUI's directory.

You can download 3.10 Python from here: https://www.python.org/downloads/release/python-3106/

Alternatively, use a binary release of WebUI: https://github.com/AUTOMATIC1111/stable-diffusion-webui/releases

Use --skip-python-version-check to suppress this warning.

Python 3.11.5 | packaged by Anaconda, Inc. | (main, Sep 11 2023, 13:26:23) [MSC v.1916 64 bit (AMD64)] Version: 1.6.0 Commit hash: Cloning Stable Diffusion into C:\Users\jonat\StableDiffusion1\stable-diffusion-webui\repositories\stable-diffusion-stability-ai... '"git"' is not recognized as an internal or external command, operable program or batch file. Traceback (most recent call last): File "C:\Users\jonat\StableDiffusion1\stable-diffusion-webui\launch.py", line 48, in main() File "C:\Users\jonat\StableDiffusion1\stable-diffusion-webui\launch.py", line 39, in main prepare_environment() File "C:\Users\jonat\StableDiffusion1\stable-diffusion-webui\modules\launch_utils.py", line 380, in prepare_environment git_clone(stable_diffusion_repo, repo_dir('stable-diffusion-stability-ai'), "Stable Diffusion", stable_diffusion_commit_hash) File "C:\Users\jonat\StableDiffusion1\stable-diffusion-webui\modules\launch_utils.py", line 186, in git_clone run(f'"{git}" clone "{url}" "{dir}"', f"Cloning {name} into {dir}...", f"Couldn't clone {name}", live=True) File "C:\Users\jonat\StableDiffusion1\stable-diffusion-webui\modules\launch_utils.py", line 115, in run raise RuntimeError("\n".join(error_bits)) RuntimeError: Couldn't clone Stable Diffusion. Command: "git" clone "https://github.com/Stability-AI/stablediffusion.git" "C:\Users\jonat\StableDiffusion1\stable-diffusion-webui\repositories\stable-diffusion-stability-ai" Error code: 1

Fucking-the-life commented 1 year ago

我也遇到了同样的问题,问题出错的原因是因为无法在cmd命令行执行 git 命令。这是因为虽然安装了git但是没有在环境变量中配置git的路径所以cmd没有办法执行git 命令。只要在环境变量的path中配置git的bin文件夹路径即可。

Yahyylbg commented 1 year ago

Thank you for sharing. I think your method was correct and perfectly solved my problem. And I am a computer noob, so I just went to google for how to add environment variables and posted here to provide:

  1. Find your git installation path first, locate the bin folder, and copy the path in the bin folder

  2. Open Computer Settings "About">>"Advanced System Settings">>"Environment Variables"

  3. Find "path", click "edit", create a new path, paste the just GIT path, and click OK

  4. Rerun webui-user.bat

for now it should work and solve the clone error 128

Ivan-Kudryavcev commented 11 months ago

it worked for me:

git config --global --unset http.postBuffer

vagabund44 commented 7 months ago

Thank you for sharing. I think your method was correct and perfectly solved my problem. And I am a computer noob, so I just went to google for how to add environment variables and posted here to provide:

1. Find your git installation path first, locate the bin folder, and copy the path in the bin folder

2. Open Computer Settings "About">>"Advanced System Settings">>"Environment Variables"

3. Find "path", click "edit", create a new path, paste the just GIT path, and click OK

4. Rerun webui-user.bat

for now it should work and solve the clone error 128

That was really the solution. Thank you so much!

RomanBabalaev commented 7 months ago

Hello everyone I prescribed a path for GIT, it didn't help me what else could it be

venv "H:\SD\stable-diffusion-webui-master\venv\Scripts\Python.exe" fatal: not a git repository (or any of the parent directories): .git fatal: not a git repository (or any of the parent directories): .git Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)] Version: 1.9.3 Commit hash: Cloning Stable Diffusion into H:\SD\stable-diffusion-webui-master\repositories\stable-diffusion-stability-ai... Cloning into 'H:\SD\stable-diffusion-webui-master\repositories\stable-diffusion-stability-ai'... remote: Enumerating objects: 580, done. remote: Counting objects: 100% (571/571), done. remote: Compressing objects: 100% (306/306), done. error: RPC failed; curl 18 transfer closed with outstanding read data remaining error: 2305 bytes of body are still expected fetch-pack: unexpected disconnect while reading sideband packet fatal: early EOF fatal: fetch-pack: invalid index-pack output Traceback (most recent call last): File "H:\SD\stable-diffusion-webui-master\launch.py", line 48, in main() File "H:\SD\stable-diffusion-webui-master\launch.py", line 39, in main prepare_environment() File "H:\SD\stable-diffusion-webui-master\modules\launch_utils.py", line 411, in prepare_environment git_clone(stable_diffusion_repo, repo_dir('stable-diffusion-stability-ai'), "Stable Diffusion", stable_diffusion_commit_hash) File "H:\SD\stable-diffusion-webui-master\modules\launch_utils.py", line 191, in git_clone run(f'"{git}" clone --config core.filemode=false "{url}" "{dir}"', f"Cloning {name} into {dir}...", f"Couldn't clone {name}", live=True) File "H:\SD\stable-diffusion-webui-master\modules\launch_utils.py", line 115, in run raise RuntimeError("\n".join(error_bits)) RuntimeError: Couldn't clone Stable Diffusion. Command: "git" clone --config core.filemode=false "https://github.com/Stability-AI/stablediffusion.git" "H:\SD\stable-diffusion-webui-master\repositories\stable-diffusion-stability-ai" Error code: 128

slowlearnerLspeedup commented 7 months ago

Thank you for sharing. I think your method was correct and perfectly solved my problem. And I am a computer noob, so I just went to google for how to add environment variables and posted here to provide:

  1. Find your git installation path first, locate the bin folder, and copy the path in the bin folder
  2. Open Computer Settings "About">>"Advanced System Settings">>"Environment Variables"
  3. Find "path", click "edit", create a new path, paste the just GIT path, and click OK
  4. Rerun webui-user.bat

for now it should work and solve the clone error 128

Problem solved, Thanks bro!

RomanBabalaev commented 7 months ago

Thank you for sharing. I think your method was correct and perfectly solved my problem. And I am a computer noob, so I just went to google for how to add environment variables and posted here to provide:

  1. Find your git installation path first, locate the bin folder, and copy the path in the bin folder
  2. Open Computer Settings "About">>"Advanced System Settings">>"Environment Variables"
  3. Find "path", click "edit", create a new path, paste the just GIT path, and click OK
  4. Rerun webui-user.bat

for now it should work and solve the clone error 128

Problem solved, Thanks bro!

I do it as per the instructions. The problem persists.Are there any other solutions?

utkars234 commented 6 months ago

I was using my mobile hotspot for running webui-user.bat and each time I was getting the error " fatal: unable to access 'https://github.com/AUTOMATIC1111/stable-diffusion-webui.git/': Send failure: Connection was reset ". After researching the solution, I tried to switch my data connection from sim1 to sim2, and Boom it worked for me.

Conclusion. It's mostly a connection problem. Try to change your wifi connection or switch it to your mobile hotspot or connect with your friend wifi and then retry

Andersen1729 commented 3 months ago

Thank you for sharing. I think your method was correct and perfectly solved my problem. And I am a computer noob, so I just went to google for how to add environment variables and posted here to provide:

  1. Find your git installation path first, locate the bin folder, and copy the path in the bin folder
  2. Open Computer Settings "About">>"Advanced System Settings">>"Environment Variables"
  3. Find "path", click "edit", create a new path, paste the just GIT path, and click OK
  4. Rerun webui-user.bat

for now it should work and solve the clone error 128

Thank you very much, it really helped me.