stable-diffusion-webui
stable-diffusion-webui copied to clipboard
[Bug]: GFPGAN install always failed
Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
What happened?
run webui-user.bat with python 3.10.6, setuptools 63.2.0, https://github.com/TencentARC/GFPGAN.git to commit 8d2447a2d918f8eba5a4a01463fd48e45126a379. someone said upgrade setuptools to latest, but still failed. and I found so many people have this problem. maybe you drop some critial comment in readme.md.
Steps to reproduce the problem
File:webui-user.bat @echo off
set PYTHON=D:\IDE\Python_3.10.6\python.exe set GIT=D:\IDE\Git\bin\git.exe set VENV_DIR=Depens set COMMANDLINE_ARGS=
call webui.bat
What should have happened?
it should not stop at runing GFPGAN setup.py
Commit where the problem happens
lastest version, or version: f378b8d53ab30d37f665cfede65530ca3436a111
What platforms do you use to access the UI ?
No response
What browsers do you use to access the UI ?
No response
Command Line Arguments
"K:\AI\stable-diffusion-webui\Depens\Scripts\python.exe" -m pip install git+https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379 --prefer-binary
List of extensions
No
Console logs
venv "K:\AI\stable-diffusion-webui\Depens\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: f378b8d53ab30d37f665cfede65530ca3436a111
Installing gfpgan
Traceback (most recent call last):
File "K:\AI\stable-diffusion-webui\launch.py", line 294, in <module>
prepare_environment()
File "K:\AI\stable-diffusion-webui\launch.py", line 212, in prepare_environment
run_pip(f"install {gfpgan_package}", "gfpgan")
File "K:\AI\stable-diffusion-webui\launch.py", line 78, 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 "K:\AI\stable-diffusion-webui\launch.py", line 49, in run
raise RuntimeError(message)
RuntimeError: Couldn't install gfpgan.
Command: "K:\AI\stable-diffusion-webui\Depens\Scripts\python.exe" -m pip install git+https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379 --prefer-binary
Error code: 1
stdout: Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple/
Collecting git+https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379
Cloning https://github.com/TencentARC/GFPGAN.git (to revision 8d2447a2d918f8eba5a4a01463fd48e45126a379) to c:\users\ty\appdata\local\temp\pip-req-build-e54fx322
Resolved https://github.com/TencentARC/GFPGAN.git to commit 8d2447a2d918f8eba5a4a01463fd48e45126a379
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'error'
stderr: Running command git clone --filter=blob:none --quiet https://github.com/TencentARC/GFPGAN.git 'C:\Users\TY\AppData\Local\Temp\pip-req-build-e54fx322'
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
python setup.py egg_info did not run successfully.
exit code: 1
[45 lines of output]
K:\AI\stable-diffusion-webui\Depens\lib\site-packages\setuptools\installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
warnings.warn(
WARNING: The wheel package is not available.
K:\AI\stable-diffusion-webui\Depens\lib\site-packages\setuptools\_distutils\dist.py:265: UserWarning: Unknown distribution option: 'install_requires'
warnings.warn(msg)
K:\AI\stable-diffusion-webui\Depens\lib\site-packages\setuptools\_distutils\dist.py:265: UserWarning: Unknown distribution option: 'extras_require'
warnings.warn(msg)
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\TY\AppData\Local\Temp\pip-req-build-e54fx322\setup.py", line 84, in <module>
setup(
File "K:\AI\stable-diffusion-webui\Depens\lib\site-packages\setuptools\__init__.py", line 107, in setup
_install_setup_requires(attrs)
File "K:\AI\stable-diffusion-webui\Depens\lib\site-packages\setuptools\__init__.py", line 80, in _install_setup_requires
_fetch_build_eggs(dist)
File "K:\AI\stable-diffusion-webui\Depens\lib\site-packages\setuptools\__init__.py", line 85, in _fetch_build_eggs
dist.fetch_build_eggs(dist.setup_requires)
File "K:\AI\stable-diffusion-webui\Depens\lib\site-packages\setuptools\dist.py", line 879, in fetch_build_eggs
resolved_dists = pkg_resources.working_set.resolve(
File "K:\AI\stable-diffusion-webui\Depens\lib\site-packages\pkg_resources\__init__.py", line 815, in resolve
dist = self._resolve_dist(
File "K:\AI\stable-diffusion-webui\Depens\lib\site-packages\pkg_resources\__init__.py", line 851, in _resolve_dist
dist = best[req.key] = env.best_match(
File "K:\AI\stable-diffusion-webui\Depens\lib\site-packages\pkg_resources\__init__.py", line 1123, in best_match
return self.obtain(req, installer)
File "K:\AI\stable-diffusion-webui\Depens\lib\site-packages\pkg_resources\__init__.py", line 1135, in obtain
return installer(requirement)
File "K:\AI\stable-diffusion-webui\Depens\lib\site-packages\setuptools\dist.py", line 949, in fetch_build_egg
return fetch_build_egg(self, req)
File "K:\AI\stable-diffusion-webui\Depens\lib\site-packages\setuptools\installer.py", line 87, in fetch_build_egg
wheel.install_as_egg(dist_location)
File "K:\AI\stable-diffusion-webui\Depens\lib\site-packages\setuptools\wheel.py", line 110, in install_as_egg
self._install_as_egg(destination_eggdir, zf)
File "K:\AI\stable-diffusion-webui\Depens\lib\site-packages\setuptools\wheel.py", line 118, in _install_as_egg
self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
File "K:\AI\stable-diffusion-webui\Depens\lib\site-packages\setuptools\wheel.py", line 175, in _convert_metadata
setup_dist.get_command_obj('egg_info'),
File "K:\AI\stable-diffusion-webui\Depens\lib\site-packages\setuptools\_distutils\dist.py", line 860, in get_command_obj
klass = self.get_command_class(command)
File "K:\AI\stable-diffusion-webui\Depens\lib\site-packages\setuptools\dist.py", line 961, in get_command_class
return _Distribution.get_command_class(self, command)
File "K:\AI\stable-diffusion-webui\Depens\lib\site-packages\setuptools\_distutils\dist.py", line 844, in get_command_class
raise DistutilsModuleError("invalid command '%s'" % command)
distutils.errors.DistutilsModuleError: invalid command 'egg_info'
[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.
Additional information
No response
Same here
Same here. https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/7919
I just find a way that can solve my problem.
run cmd
Use the git config command to query the proxy and cancel the proxy
View agent:
git config --global http.proxy
Display the existing http proxy information:
http://127.0.0.1:8888
Cancel proxy:
git config --global --unset http.proxy
the original webpage is : https://blog.csdn.net/lvmengzou/article/details/119350664
same here,设置成全局代理(global proxy)就可以了
same here,设置成全局代理(global proxy)就可以了
我怎么不行?就是安装不成功。
same here,设置成全局代理(global proxy)就可以了
我怎么不行?就是安装不成功。
重新安裝幾次python對應版本就可以了
same here solved see https://savokiss.com/tech/sdw-install-error.html
same here,设置成全局代理(global proxy)就可以了
我怎么不行?就是安装不成功。
重新安裝幾次python對應版本就可以了
感觉说到底还是网络问题,你试试能不能把报错的那个包从github上下下来
same here,设置成全局代理(global proxy)就可以了
我怎么不行?就是安装不成功。
重新安裝幾次python對應版本就可以了
感觉说到底还是网络问题,你试试能不能把报错的那个包从github上下下来
bilibili上有整合好的一键安装包,搜索关键词“AI绘画 一键部署”可以找到
same here solved see https://savokiss.com/tech/sdw-install-error.html
thx, also solved.
I install the webui on my Max Studio (Apple M1 Max) in China. I resolved it by the follow steps:
- change all git url to ghproxy url in launch.py (as @Elitedj 's solution)
gfpgan_package = os.environ.get('GFPGAN_PACKAGE', "git+https://ghproxy.com/https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379") clip_package = os.environ.get('CLIP_PACKAGE', "git+https://ghproxy.com/https://github.com/openai/CLIP.git@d50d76daa670286dd6cacf3bcd80b5e4823fc8e1") openclip_package = os.environ.get('OPENCLIP_PACKAGE', "git+https://ghproxy.com/https://github.com/mlfoundations/open_clip.git@bb6e834e9c70d9c27d0dc3ecedeebeaeb1ffad6b") 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") k_diffusion_repo = os.environ.get('K_DIFFUSION_REPO', 'https://ghproxy.com/https://github.com/crowsonkb/k-diffusion.git') codeformer_repo = os.environ.get('CODEFORMER_REPO', 'https://ghproxy.com/https://github.com/sczhou/CodeFormer.git') blip_repo = os.environ.get('BLIP_REPO', 'https://ghproxy.com/https://github.com/salesforce/BLIP.git')
- update the repo url in webui-macos-env.sh
export K_DIFFUSION_REPO="https://ghproxy.com/https://github.com/brkirch/k-diffusion.git"
- run ./webui.sh, wait for a moment, eventhing is OK!
Try also checking your xcode path: sudo xcode-select --reset
Chinese GFW proxy issue, set system global proxy or git global proxy.
Wait since when does Auto's have GFPGan??
same here solved see https://savokiss.com/tech/sdw-install-error.html
thx!! solved
I was having the same issue, to solve i used this command in cmd and fixed.
git config --global init.defaultBranch main
replace https://github.com
with https://ghproxy.com/https://github.com
and cancel your proxy.