stable-diffusion-webui
stable-diffusion-webui copied to clipboard
[Bug]: Installing gfpgan error
Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
What happened?
when I run the webui-user.bat I got the below error and can't go any further, simply says can't install gfpgan.git and doesn't go any further. tried to delete everything and start again also not worked
Steps to reproduce the problem
- Go to ....
- Press ....
- ...
What should have happened?
first time installing this, following instructions on web no idea what is the problem. tried to install gfpgan manually didn't help
Commit where the problem happens
.
What platforms do you use to access the UI ?
Windows
What browsers do you use to access the UI ?
Google Chrome
Command Line Arguments
no
List of extensions
no
Console logs
Commit hash: <none>
Installing gfpgan
Traceback (most recent call last):
File "C:\AI\stable-diffusion-webui-master\launch.py", line 355, in <module>
prepare_environment()
File "C:\AI\stable-diffusion-webui-master\launch.py", line 263, in prepare_environment
run_pip(f"install {gfpgan_package}", "gfpgan")
File "C:\AI\stable-diffusion-webui-master\launch.py", line 129, 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:\AI\stable-diffusion-webui-master\launch.py", line 97, in run
raise RuntimeError(message)
RuntimeError: Couldn't install gfpgan.
Command: "C:\AI\stable-diffusion-webui-master\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\nemo\appdata\local\temp\pip-req-build-lm6llf39
stderr: Running command git clone --filter=blob:none --quiet https://github.com/TencentARC/GFPGAN.git 'C:\Users\Nemo\AppData\Local\Temp\pip-req-build-lm6llf39'
fatal: this operation must be run in a work tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'
error: subprocess-exited-with-error
git clone --filter=blob:none --quiet https://github.com/TencentARC/GFPGAN.git 'C:\Users\Nemo\AppData\Local\Temp\pip-req-build-lm6llf39' did not run successfully.
exit code: 128
See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
git clone --filter=blob:none --quiet https://github.com/TencentARC/GFPGAN.git 'C:\Users\Nemo\AppData\Local\Temp\pip-req-build-lm6llf39' did not run successfully.
exit code: 128
See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
Additional information
No response
GPT:
The error message suggests that the installation of gfpgan failed due to a problem with the git clone command. Specifically, the error message states that "fatal: this operation must be run in a work tree" and "warning: Clone succeeded, but checkout failed."
This error message indicates that git clone was successful, but git checkout failed. Git clone is used to create a local copy of the remote git repository, while git checkout is used to switch to a specific branch or commit within the repository. The error message suggests that the git checkout command failed because it was not run in the correct directory or because the repository is not set up correctly.
To resolve this issue, you can try the following steps:
Check that you have the correct version of Git installed on your system.
Make sure that you are running the installation command in the correct directory.
Ensure that the repository is set up correctly and that the specified commit hash exists.
Try running the command again with the --no-cache-dir flag to ensure that no cached files are interfering with the installation.
Check this in cmd
python -m pip install git+https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379 --prefer-binary
Check this in cmd
python -m pip install git+https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379 --prefer-binary
thank you! it works for me. But i compare this command and the command in the launch, and i do not find the difference. why this command works?
my installation directory is C:\AI\stable-diffusion-webui-master. do I need to go cmd (as admin) and copy paste this "python -m pip install git+https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379 --prefer-binary" directly and run (which I did under c:windows\system32 and did install things but got the same error when I run webui-user.bat) or first I run cd C:\AI\stable-diffusion-webui-master and then run "python -m pip install git+https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379 --prefer-binary"
I tried uninstalling and installing things a few times, followed youtube videos that said to be working and still couldn't manage to lay my hands on stable diffusion. Any tips like explaining to an idiot would help. thanks again
PS F:\stable-diffusion-webui-1.1.0> python -m pip install git+https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379 --prefer-binary Looking in indexes: https://mirrors.aliyun.com/pypi/simple/ Collecting git+https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379 Cloning https://github.com/TencentARC/GFPGAN.git (to revision 8d2447a2d918f8eba5a4a01463fd48e45126a379) to c:\users\leaper\appdata\local\temp\pip-req-build-20wu40x3 Running command git clone --filter=blob:none --quiet https://github.com/TencentARC/GFPGAN.git 'C:\Users\Leaper\AppData\Local\Temp\pip-req-build-20wu40x3' Running command git rev-parse -q --verify 'sha^8d2447a2d918f8eba5a4a01463fd48e45126a379' Running command git fetch -q https://github.com/TencentARC/GFPGAN.git 8d2447a2d918f8eba5a4a01463fd48e45126a379 fatal: unable to access 'https://github.com/TencentARC/GFPGAN.git/': Failed to connect to github.com port 443 after 21148 ms: Timed out error: subprocess-exited-with-error
× git fetch -q https://github.com/TencentARC/GFPGAN.git 8d2447a2d918f8eba5a4a01463fd48e45126a379 did not run successfully. │ exit code: 128 ╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error
× git fetch -q https://github.com/TencentARC/GFPGAN.git 8d2447a2d918f8eba5a4a01463fd48e45126a379 did not run successfully. │ exit code: 128 ╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
I tried reinstalling git. Seemed to have worked for me. If you are in China there's a similar problem due to connection time out
PS F:\stable-diffusion-webui-1.1.0> python -m pip install git+ https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379 --prefer-binary 查看索引:https://mirrors. aliyun.com/pypi/simple/ 采集 git+ https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379 克隆https://github.com/TencentARC/GFPGAN.git (to revision 8d2447a2d918f8eba5a4a01463f d48e45126a379) 到 c:\users\ leaper\appdata\local\temp\pip-req-build-20wu40x3 运行命令 git clone --filter=blob:none --quiet https://github.com/TencentARC/GFPGAN.git 'C:\Users\Leaper\ AppData\Local\Temp\pip-req-build-20wu40x3' 运行命令 git rev-parse -q --verify 'sha^8d2447a2d918f8eba5a4a01463fd48e45126a379'无法访问 “ https://github.com/ TencentARC/GFPGAN.git/ ': Failed to connect to github.com port 443 after 21148 ms: 超时 错误:subprocess-exited-with-error
× git fetch -q https://github.com/TencentARC/GFPGAN.git 8d2447a2d918f8eba5a4a01463fd48e45126a379 没有运行成功。 │ 退出代码:128 ╰─> 输出见上。
注意:此错误源自子进程,可能不是 pip 的问题。 错误:子进程因错误而退出
× git fetch -q https://github.com/TencentARC/GFPGAN.git 8d2447a2d918f8eba5a4a01463fd48e45126a379 没有运行成功。 │ 退出代码:128 ╰─> 输出见上。
注意:此错误源自子进程,可能不是 pip 的问题。
可以将C:\Users\xxxx\AppData\Local\Temp\ 目录清理 下试试