stable-diffusion-webui
stable-diffusion-webui copied to clipboard
[Bug]:
Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
What happened?
After launching webui-user.bat, an error occurred. Please take a look at the console logs for more info.
Steps to reproduce the problem
- Go to the installation folder stable-diffusion-webui
- Double clicked on webui-user.bat
- Wait
What should have happened?
Web UI successfully built
Commit where the problem happens
Commit hash:
What platforms do you use to access the UI ?
Windows
What browsers do you use to access the UI ?
Google Chrome
Command Line Arguments
@echo off
set PYTHON=C:\Users\gordo\AppData\Local\Programs\Python\Python310\python.exe
set GIT=
set VENV_DIR=
set COMMANDLINE_ARGS=
git pull
call webui.bat
List of extensions
No
Console logs
'git' is not recognized as an internal or external command,
operable program or batch file.
venv "C:\Users\gordo\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Commit hash: <none>
Installing gfpgan
Traceback (most recent call last):
File "C:\Users\gordo\stable-diffusion-webui\launch.py", line 360, in <module>
prepare_environment()
File "C:\Users\gordo\stable-diffusion-webui\launch.py", line 275, in prepare_environment
run_pip(f"install {gfpgan_package}", "gfpgan")
File "C:\Users\gordo\stable-diffusion-webui\launch.py", line 137, in run_pip
return run(f'"{python}" -m pip {args} --prefer-binary{index_url_line}', desc=f"Installing {desc}", errdesc=f"Couldn't install {desc}")
File "C:\Users\gordo\stable-diffusion-webui\launch.py", line 105, in run
raise RuntimeError(message)
RuntimeError: Couldn't install gfpgan.
Command: "C:\Users\gordo\stable-diffusion-webui\venv\Scripts\python.exe" -m pip install git+https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379 --prefer-binary
Error code: 1
stdout: Collecting git+https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379
Cloning https://github.com/TencentARC/GFPGAN.git (to revision 8d2447a2d918f8eba5a4a01463fd48e45126a379) to c:\users\gordo\appdata\local\temp\pip-req-build-8fv5nkub
stderr: ERROR: Error [WinError 2] The system cannot find the file specified while executing command git version
ERROR: Cannot find command 'git' - do you have 'git' installed and in your PATH?
[notice] A new release of pip available: 22.2.1 -> 23.0.1
[notice] To update, run: C:\Users\gordo\stable-diffusion-webui\venv\Scripts\python.exe -m pip install --upgrade pip
Press any key to continue . . .
Additional information
No response
"'git' is not recognized as an internal or external command,"
Do you have git installed and is it in your path ?
"'git' is not recognized as an internal or external command,"
Do you have git installed and is it in your path ?
yes it is installed, but I'm not sure that it is in my path.
"'git' is not recognized as an internal or external command,"
Do you have git installed and is it in your path ?
Thank you Frank, I've added git to my path and it worked for me.
For anyone experiencing the same issue:
I first opened the command prompt (searching cmd in the windows search bar) and typed where git.exe. This gives me the location of where git.exe is located. (In my case is C:\Program Files\Git\cmd\git.exe)
Then, follow the steps here. For the fifth step, click "New" and paste the location of git.exe that you got earlier to the path.
This fixed my error and got stable diffusion running in my case. Hope this helps!
Try also resetting the path of XCode Command Line: sudo xcode-select --reset
I also had similar problem, deleting git then installing for all users solved my problem.
I had a very similar if not identical error and found the solution. Steps to follow:
- Open the Start menu and look for "Environment Variables".
- Select "Edit system environment variables".
- Click the "Environment Variables" button.
- In the "System Variables" section, find the PATH variable and click the "Edit" button.
- Click the "New" button and add the path to the git application (e.g. "C:\Program Files\Git\bin").
- Click "OK" to save your changes and close all windows.
Once you have added the git application path to the PATH environment variable, try running the .bat file again. I hope this helps you fix the problem.
Curiosity: Chat GPT solved it for me, because I had no idea. :-)