stable-diffusion
stable-diffusion copied to clipboard
"RuntimeError: Couldn't install gfpgan." When installing webui
i've managed to install Pytorch successfully, but now whenever i try to install gfpgan i get this error, what does it mean?
RuntimeError: Couldn't install gfpgan. Command: "C:\Users\user\Desktop\stable-diffusion-webui\venv\Scripts\python.exe" -m pip install git+https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379 --prefer-binary Error code: 2 stdout:
no such option: --prefer-binary
updating Python to 3.10 solved this issue, but now i have another one
RuntimeError: CUDA out of memory. Tried to allocate 20.00 MiB (GPU 0; 2.00 GiB total capacity; 1.68 GiB already allocated; 0 bytes free; 1.72 GiB reserved in total by PyTorch)
RuntimeError: Couldn't install gfpgan. I got the same error with Python 3.10. I was wondering how you solved it.
Edit: I had installed Python 3.10, but the older python version was still in my path file. I removed the offending version(s) and it works perfectly.
Any Luck? Mine says 'could not install gfpgan.'
I also have this error. Python 3.10.6. I first tried with Python 11, and I am wondering if that messed up the install.
I met the same error.
me too
I had a similar issue, but in my case it was not due to an unknown option --prefer-binary
but rather due to a missing Git executable. Git was not in my Windows PATH and the installation requires it to install this particular component. Not directly related to the issue pointed out by the OP, but dropping this here for anyone who gets brought here by a gfpgan
installation error.
I resolved it, Python version >= 3.8 is required. I used Python 3.9.10. Then run ./webui.sh
. If you still get an error then manually download gfpgan
using the following command: python3 -m pip install git+https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379 --prefer-binary
It works for me. Please let me know if any issues.
NOTE: before changing Python version, don't forget to remove venv
folder
If you still get an error then manually download
gfpgan
using the following command:python3 -m pip install git+https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379 --prefer-binary
It works for me. Please let me know if any issues.
Running that resulted in many "Requirement already satisfied" notices; the original problem persists. GIT is installed to PATH.
My python version is 3.10.6 (Windows11), but it still give me this error.
I believe it has the same solution as git https fatal: HTTP request failed
.
My method (write done these in your cmd one by one):
git config --global http.sslverify true git config --global http.sslCAPath /etc/pki/tls/certs git config --global http.postBuffer 524288000
for most Chinese users, run python3 -m pip install git+https://ghproxy.com/https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379 --prefer-binary
but if you run ./webui.sh
, you still get same error. please change all https://github.com/
into https://ghproxy.com/https://github.com/
in stable-diffusion-webui/launch.py
.
if you happend to know chinese, please read this tutorial. https://zhuanlan.zhihu.com/p/608397859
for most Chinese users, run
python3 -m pip install git+https://ghproxy.com/https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379 --prefer-binary
And also you need to change your VPN to global and set the proxy in terminal. For an example, select copy shell command in Clash menu then paste it in terminal and press enter.
for most Chinese users, run
python3 -m pip install git+https://ghproxy.com/https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379 --prefer-binary
very helpful !!!
Dear friends,
for most Chinese users, run
python3 -m pip install git+https://ghproxy.com/https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379 --prefer-binary
And also you need to change your VPN to global and set the proxy in terminal. For an example, select copy shell command in Clash menu then paste it in terminal and press enter.
I followed this and Successfully built gfpgan basicsr lmdb filterpy future
, with this , I ran ./webui.sh , I still get RuntimeError: Couldn't install gfpgan.
Do you have any idea what is going on?
@CKMWithoutPhaseAngle I update my comment.
it works!!
im getting to installing gfpgan and its just hanging there not doing anything
@CKMWithoutPhaseAngle I update my comment.
Thanks a lot. This works!
- first install cython by
stable-diffusion-webui/venv/bin/python3 -m pip install cython
; - and then change all https://github.com/ into https://ghproxy.com/https://github.com/ in stable-diffusion-webui/launch.py;
- and then
./webui.sh
I resolved it, Python version >= 3.8 is required. I used Python 3.9.10. Then run
./webui.sh
. If you still get an error then manually downloadgfpgan
using the following command:python3 -m pip install git+https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379 --prefer-binary
It works for me. Please let me know if any issues.NOTE: before changing Python version, don't forget to remove
venv
folder
In what program i have to run that code? i have to just paste it like that?
in chinese area can try it ,use qinghua source python3 -m pip install git+https://ghproxy.com/https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379 --prefer-binary --default-timeout=100 -i https://pypi.tuna.tsinghua.edu.cn/simple
in chinese area can try it ,use qinghua source python3 -m pip install git+https://ghproxy.com/https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379 --prefer-binary --default-timeout=100 -i https://pypi.tuna.tsinghua.edu.cn/simple
Thanks a lot. This works!
im getting this error
Commit hash: 22bcc7be428c94e9408f589966c2040187245d81
Installing gfpgan
Traceback (most recent call last):
File "/Users/aurifell/Desktop/Coding/AUTOMATIC1111/stable-diffusion-webui/launch.py", line 355, in <module>
prepare_environment()
File "/Users/aurifell/Desktop/Coding/AUTOMATIC1111/stable-diffusion-webui/launch.py", line 263, in prepare_environment
run_pip(f"install {gfpgan_package}", "gfpgan")
File "/Users/aurifell/Desktop/Coding/AUTOMATIC1111/stable-diffusion-webui/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 "/Users/aurifell/Desktop/Coding/AUTOMATIC1111/stable-diffusion-webui/launch.py", line 97, in run
raise RuntimeError(message)
RuntimeError: Couldn't install gfpgan.
Command: "/Users/aurifell/Desktop/Coding/AUTOMATIC1111/stable-diffusion-webui/venv/bin/python3.10" -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 /private/var/folders/xt/zgv9s0397hx_qqzm8kmjrww80000gn/T/pip-req-build-cqb9qmqe
Resolved https://github.com/TencentARC/GFPGAN.git to commit 8d2447a2d918f8eba5a4a01463fd48e45126a379
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting basicsr>=1.4.2
Using cached basicsr-1.4.2.tar.gz (172 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting facexlib>=0.2.5
Using cached facexlib-0.2.5-py3-none-any.whl (59 kB)
Collecting lmdb
Using cached lmdb-1.4.0.tar.gz (881 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Requirement already satisfied: numpy in ./venv/lib/python3.10/site-packages (from gfpgan==1.3.5) (1.24.2)
Collecting opencv-python
Using cached opencv_python-4.7.0.72-cp37-abi3-macosx_11_0_arm64.whl (32.6 MB)
Collecting pyyaml
Using cached PyYAML-6.0-cp310-cp310-macosx_11_0_arm64.whl (173 kB)
Collecting scipy
Using cached scipy-1.10.1.tar.gz (42.4 MB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Installing backend dependencies: started
Installing backend dependencies: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'error'
stderr: Running command git clone --filter=blob:none --quiet https://github.com/TencentARC/GFPGAN.git /private/var/folders/xt/zgv9s0397hx_qqzm8kmjrww80000gn/T/pip-req-build-cqb9qmqe
Running command git rev-parse -q --verify 'sha^8d2447a2d918f8eba5a4a01463fd48e45126a379'
Running command git fetch -q https://github.com/TencentARC/GFPGAN.git 8d2447a2d918f8eba5a4a01463fd48e45126a379
Running command git checkout -q 8d2447a2d918f8eba5a4a01463fd48e45126a379
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [40 lines of output]
The Meson build system
Version: 1.0.1
Source dir: /private/var/folders/xt/zgv9s0397hx_qqzm8kmjrww80000gn/T/pip-install-7rha6fp2/scipy_c4aa53716a844ffc88f7969d243c2bbe
Build dir: /private/var/folders/xt/zgv9s0397hx_qqzm8kmjrww80000gn/T/pip-install-7rha6fp2/scipy_c4aa53716a844ffc88f7969d243c2bbe/.mesonpy-jvfd4dmq/build
Build type: native build
Project name: SciPy
Project version: 1.10.1
C compiler for the host machine: cc (clang 13.0.0 "Apple clang version 13.0.0 (clang-1300.0.29.30)")
C linker for the host machine: cc ld64 711
C++ compiler for the host machine: c++ (clang 13.0.0 "Apple clang version 13.0.0 (clang-1300.0.29.30)")
C++ linker for the host machine: c++ ld64 711
Cython compiler for the host machine: cython (cython 0.29.34)
Host machine cpu family: aarch64
Host machine cpu: aarch64
Compiler for C supports arguments -Wno-unused-but-set-variable: NO
Compiler for C supports arguments -Wno-unused-function: YES
Compiler for C supports arguments -Wno-conversion: YES
Compiler for C supports arguments -Wno-misleading-indentation: YES
Compiler for C supports arguments -Wno-incompatible-pointer-types: YES
Library m found: YES
../../meson.build:63:0: ERROR: Unknown compiler(s): [['gfortran'], ['flang'], ['nvfortran'], ['pgfortran'], ['ifort'], ['ifx'], ['g95']]
The following exception(s) were encountered:
Running `gfortran --version` gave "[Errno 2] No such file or directory: 'gfortran'"
Running `gfortran -V` gave "[Errno 2] No such file or directory: 'gfortran'"
Running `flang --version` gave "[Errno 2] No such file or directory: 'flang'"
Running `flang -V` gave "[Errno 2] No such file or directory: 'flang'"
Running `nvfortran --version` gave "[Errno 2] No such file or directory: 'nvfortran'"
Running `nvfortran -V` gave "[Errno 2] No such file or directory: 'nvfortran'"
Running `pgfortran --version` gave "[Errno 2] No such file or directory: 'pgfortran'"
Running `pgfortran -V` gave "[Errno 2] No such file or directory: 'pgfortran'"
Running `ifort --version` gave "[Errno 2] No such file or directory: 'ifort'"
Running `ifort -V` gave "[Errno 2] No such file or directory: 'ifort'"
Running `ifx --version` gave "[Errno 2] No such file or directory: 'ifx'"
Running `ifx -V` gave "[Errno 2] No such file or directory: 'ifx'"
Running `g95 --version` gave "[Errno 2] No such file or directory: 'g95'"
Running `g95 -V` gave "[Errno 2] No such file or directory: 'g95'"
A full log can be found at /private/var/folders/xt/zgv9s0397hx_qqzm8kmjrww80000gn/T/pip-install-7rha6fp2/scipy_c4aa53716a844ffc88f7969d243c2bbe/.mesonpy-jvfd4dmq/build/meson-logs/meson-log.txt
+ meson setup --prefix=/opt/homebrew/Cellar/[email protected]/3.10.10_1/Frameworks/Python.framework/Versions/3.10 /private/var/folders/xt/zgv9s0397hx_qqzm8kmjrww80000gn/T/pip-install-7rha6fp2/scipy_c4aa53716a844ffc88f7969d243c2bbe /private/var/folders/xt/zgv9s0397hx_qqzm8kmjrww80000gn/T/pip-install-7rha6fp2/scipy_c4aa53716a844ffc88f7969d243c2bbe/.mesonpy-jvfd4dmq/build --native-file=/private/var/folders/xt/zgv9s0397hx_qqzm8kmjrww80000gn/T/pip-install-7rha6fp2/scipy_c4aa53716a844ffc88f7969d243c2bbe/.mesonpy-native-file.ini -Ddebug=false -Doptimization=2
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.```
idk what to do, says it can't install gfpgan so idk
It work for me! modify launch.py
find out launch.py at root modify prepare_enviroment() modify https://github.com/ to https://ghproxy.com/https://github.com/ and relaunch webui.bat
eg: https://www.bilibili.com/read/cv19991459?from=search
@bluce didnt work sadly
RuntimeError: Couldn't install gfpgan. I got the same error with Python 3.10. I was wondering how you solved it.
Edit: I had installed Python 3.10, but the older python version was still in my path file. I removed the offending version(s) and it works perfectly.
Sure bro.but how do you removed the offending version ?
修改temp 文件夹的权限
详情参阅(read this):https://github.com/AUTOMATIC1111/stable-diffusion-webui/discussions/8433#discussioncomment-5288509
https://github.com/AUTOMATIC1111/stable-diffusion-webui/discussions/8433#discussioncomment-5430548
你还可以通过git bash ,git clone 语句 将 gfpgan 下载到本地(stable-diffusion 的根目录)git clone https://github.com/TencentARC/GFPGAN cd gfpgan
Adding 'https://ghproxy.com/' before all links in the prepare_environment() of launch.py like so worked for me
stable_diffusion_repo = os.environ.get('STABLE_DIFFUSION_REPO', "https://ghproxy.com/https://github.com/Stability-AI/stablediffusion.git") taming_transformers_repo = os.environ.get('TAMING_TRANSFORMERS_REPO', "https://ghproxy.com/https://github.com/CompVis/taming-transformers.git")
I resolved it, Python version >= 3.8 is required. I used Python 3.9.10. Then run
./webui.sh
. If you still get an error then manually downloadgfpgan
using the following command:python3 -m pip install git+https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379 --prefer-binary
It works for me. Please let me know if any issues.NOTE: before changing Python version, don't forget to remove
venv
folder
thanks a lot! I to do this(detail):
-
Go to python venv environment: PS D:\AI\stable-diffusion-webui\venv\Scripts> .\activate (venv) PS D:\AI\stable-diffusion-webui\venv\Scripts>
-
Excute
python3 -m pip install git+https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379 --prefer-binary
, and it run and successful
Still the same error, I tried with different versions of python (I did everything correctly) yes, and it's still not clear stderr: WARNING: Certificate did not match expected hostname: codeload.github.com. Certificate: {'subject': ((('commonName', 'dns.google'),),), 'issuer': ((('countryName', 'US'),), (('organizationName', ' Google Trust Services LLC'), (('commonName', 'GTS CA 1C3'),)) 'version': 3, 'serialNumber': '5800A3B42EEE5CDE10C93DBCA470F781', 'notBefore': 'May 22 08:22: 42 2023 GMT', 'notAfter': 'Aug 14 08:22:41 2023 GMT', 'subjectAltName': (('DNS', 'dns.google'), ('DNS', 'dns.google.com' ), ('DNS', '*.dns.google.com'), ('DNS', '8888.google'), ('DNS', 'dns64.dns.google'), ('IP Address', '8.8.8.8'), ('IP Address', '8.8.4.4'), ('IP Address', '2001:4860:4860:0:0:0:0:8888'), ('IP Address' , '2001:4860:4860:0:0:0:0:8844'), ('IP Address', '2001:4860:4860:0:0:0:0:6464'), ('IP Address' , '2001:4860:4860:0:0:0:0:64')), 'OCSP': ('http://ocsp.pki.goog/gts1c3',), 'caIssuers': ('http: //pki.goog/repo/certs/gts1c3.der',), 'crlDistributionPoints': ('http://crls.pki.goog/gts1c3/zdATt0Ex_Fk.crl',)} WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(CertificateError (there's a lot more)