Launching launch.py...
=============================================================================================
INCOMPATIBLE PYTHON VERSION
This program is tested with 3.10.6 Python, but you have 3.6.12.
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-3109/
Python 3.6.12 |Anaconda, Inc.| (default, Sep 8 2020, 23:10:56)
[GCC 7.3.0]
Commit hash: a9fed7c364061ae6efb37f797b6b522cb3cf7aa2
Installing gfpgan
Traceback (most recent call last):
File "launch.py", line 380, in
prepare_environment()
File "launch.py", line 290, in prepare_environment
run_pip(f"install {gfpgan_package}", "gfpgan")
File "launch.py", line 145, 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 "launch.py", line 113, in run
raise RuntimeError(message)
RuntimeError: Couldn't install gfpgan.
Command: "/mnt/workspace/demos/stable_diffusion_webui/stable-diffusion-webui/venv/bin/python3" -m pip install git+https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379 --prefer-binary
Error code: 1
stdout: Looking in indexes: https://mirrors.cloud.aliyuncs.com/pypi/simple
Collecting git+https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379
Cloning https://github.com/TencentARC/GFPGAN.git (to revision 8d2447a2d918f8eba5a4a01463fd48e45126a379) to /tmp/pip-req-build-skd_6x7m
Collecting basicsr>=1.4.2 (from gfpgan==1.3.5)
Downloading https://mirrors.cloud.aliyuncs.com/pypi/packages/86/41/00a6b000f222f0fa4c6d9e1d6dcc9811a374cabb8abb9d408b77de39648c/basicsr-1.4.2.tar.gz (172kB)
Collecting facexlib>=0.2.5 (from gfpgan==1.3.5)
Downloading https://mirrors.cloud.aliyuncs.com/pypi/packages/36/7b/2147339dafe1c4800514c9c21ee4444f8b419ce51dfc7695220a8e0069a6/facexlib-0.3.0-py3-none-any.whl (59kB)
Collecting lmdb (from gfpgan==1.3.5)
Downloading https://mirrors.cloud.aliyuncs.com/pypi/packages/63/49/3c7bead9dcea2cdc57a91bb1f83d4d28166cdf5b0d35d6b876541b3b114b/lmdb-1.0.0-cp36-cp36m-manylinux1_x86_64.whl (278kB)
Requirement already satisfied: numpy in /home/pai/lib/python3.6/site-packages (from gfpgan==1.3.5) (1.18.0)
Requirement already satisfied: opencv-python in /home/pai/lib/python3.6/site-packages (from gfpgan==1.3.5) (4.6.0.66)
Requirement already satisfied: pyyaml in /home/pai/lib/python3.6/site-packages (from gfpgan==1.3.5) (3.13)
Requirement already satisfied: scipy in /home/pai/lib/python3.6/site-packages (from gfpgan==1.3.5) (1.4.1)
Collecting tb-nightly (from gfpgan==1.3.5)
Downloading https://mirrors.cloud.aliyuncs.com/pypi/packages/1f/77/ab49dc3ae56f9b6a02e874701a4f0d3fbab3685812e2ca89744fca1b7e1a/tb_nightly-2.11.0a20220816-py3-none-any.whl (5.9MB)
Requirement already satisfied: torch>=1.7 in /home/pai/lib/python3.6/site-packages (from gfpgan==1.3.5) (1.8.1+cpu)
Requirement already satisfied: torchvision in /home/pai/lib/python3.6/site-packages (from gfpgan==1.3.5) (0.9.1+cpu)
Requirement already satisfied: tqdm in /home/pai/lib/python3.6/site-packages (from gfpgan==1.3.5) (4.64.0)
Collecting yapf (from gfpgan==1.3.5)
Downloading https://mirrors.cloud.aliyuncs.com/pypi/packages/32/ec/531851d561ecb656bd58dc102338d0aa07e086788f351c63a9f6b8a00fe6/yapf-0.33.0-py2.py3-none-any.whl (200kB)
Collecting addict (from basicsr>=1.4.2->gfpgan==1.3.5)
Downloading https://mirrors.cloud.aliyuncs.com/pypi/packages/6a/00/b08f23b7d7e1e14ce01419a467b583edbb93c6cdb8654e54a9cc579cd61f/addict-2.4.0-py3-none-any.whl
Requirement already satisfied: future in /home/pai/lib/python3.6/site-packages (from basicsr>=1.4.2->gfpgan==1.3.5) (0.18.2)
Requirement already satisfied: Pillow in /home/pai/lib/python3.6/site-packages (from basicsr>=1.4.2->gfpgan==1.3.5) (8.4.0)
Requirement already satisfied: requests in /home/pai/lib/python3.6/site-packages (from basicsr>=1.4.2->gfpgan==1.3.5) (2.18.4)
Collecting scikit-image (from basicsr>=1.4.2->gfpgan==1.3.5)
Downloading https://mirrors.cloud.aliyuncs.com/pypi/packages/0e/ba/53e1bfbdfd0f94514d71502e3acea494a8b4b57c457adbc333ef386485da/scikit_image-0.17.2-cp36-cp36m-manylinux1_x86_64.whl (12.4MB)
Collecting filterpy (from facexlib>=0.2.5->gfpgan==1.3.5)
Downloading https://mirrors.cloud.aliyuncs.com/pypi/packages/f6/1d/ac8914360460fafa1990890259b7fa5ef7ba4cd59014e782e4ab3ab144d8/filterpy-1.4.5.zip (177kB)
Collecting numba (from facexlib>=0.2.5->gfpgan==1.3.5)
Downloading https://mirrors.cloud.aliyuncs.com/pypi/packages/73/c1/7e8bf88ee00aa89270c364c22c3f21a1e23243cbcaf3f0714fd5af953a34/numba-0.50.1-cp36-cp36m-manylinux1_x86_64.whl (2.6MB)
Collecting setuptools>=41.0.0 (from tb-nightly->gfpgan==1.3.5)
Downloading https://mirrors.cloud.aliyuncs.com/pypi/packages/b0/3a/88b210db68e56854d0bcf4b38e165e03be377e13907746f825790f3df5bf/setuptools-59.6.0-py3-none-any.whl (952kB)
Requirement already satisfied: tensorboard-plugin-wit>=1.6.0 in /home/pai/lib/python3.6/site-packages (from tb-nightly->gfpgan==1.3.5) (1.8.1)
Requirement already satisfied: grpcio>=1.24.3 in /home/pai/lib/python3.6/site-packages (from tb-nightly->gfpgan==1.3.5) (1.47.0)
Requirement already satisfied: markdown>=2.6.8 in /home/pai/lib/python3.6/site-packages (from tb-nightly->gfpgan==1.3.5) (3.3.7)
Requirement already satisfied: protobuf<3.20,>=3.9.2 in /home/pai/lib/python3.6/site-packages (from tb-nightly->gfpgan==1.3.5) (3.18.0)
Requirement already satisfied: tensorboard-data-server<0.7.0,>=0.6.0 in /home/pai/lib/python3.6/site-packages (from tb-nightly->gfpgan==1.3.5) (0.6.1)
Requirement already satisfied: google-auth<3,>=1.6.3 in /home/pai/lib/python3.6/site-packages (from tb-nightly->gfpgan==1.3.5) (2.8.0)
Requirement already satisfied: werkzeug>=1.0.1 in /home/pai/lib/python3.6/site-packages (from tb-nightly->gfpgan==1.3.5) (2.0.3)
Requirement already satisfied: google-auth-oauthlib<0.5,>=0.4.1 in /home/pai/lib/python3.6/site-packages (from tb-nightly->gfpgan==1.3.5) (0.4.6)
Requirement already satisfied: wheel>=0.26 in /home/pai/lib/python3.6/site-packages (from tb-nightly->gfpgan==1.3.5) (0.37.1)
Requirement already satisfied: absl-py>=0.4 in /home/pai/lib/python3.6/site-packages (from tb-nightly->gfpgan==1.3.5) (1.1.0)
Requirement already satisfied: dataclasses; python_version < "3.7" in /home/pai/lib/python3.6/site-packages (from torch>=1.7->gfpgan==1.3.5) (0.8)
Requirement already satisfied: typing-extensions in /home/pai/lib/python3.6/site-packages (from torch>=1.7->gfpgan==1.3.5) (4.1.1)
Requirement already satisfied: importlib-resources; python_version < "3.7" in /home/pai/lib/python3.6/site-packages (from tqdm->gfpgan==1.3.5) (5.4.0)
Collecting tomli>=2.0.1 (from yapf->gfpgan==1.3.5)
stderr: /home/pai/lib/python3.6/site-packages/OpenSSL/crypto.py:12: CryptographyDeprecationWarning: Python 3.6 is no longer supported by the Python core team. Therefore, support for it is deprecated in cryptography and will be removed in a future release.
from cryptography import x509
Could not find a version that satisfies the requirement tomli>=2.0.1 (from yapf->gfpgan==1.3.5) (from versions: 0.2.0, 0.2.1, 0.2.2, 0.2.3, 0.2.4, 0.2.5, 0.2.6, 0.2.7, 0.2.8, 0.2.9, 0.2.10, 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.1.0, 1.2.0, 1.2.1, 1.2.2, 1.2.3)
No matching distribution found for tomli>=2.0.1 (from yapf->gfpgan==1.3.5)
You are using pip version 18.1, however version 21.3.1 is available.
You should consider upgrading via the 'pip
AIGC 是指通过人工智能技术自动生成内容的生产方式,国内外多家公司进入技术竞赛白热化阶段,Microsoft,Google,Meta等公司深度投入,已经成为继互联网时代的下一个产业时代风口。其中,文图生成(Text-to-image Generation)任务是流行的跨模态生成任务,旨在生成与给定文本对应的图像。典型的文图模型例如OpenAI开发的DALL-E和DALL-E2。近期,业界也训练出了更大、更新的文图生成模型,例如Google提出的Parti和Imagen,基于扩散模型的Stable Diffusion等。基于Stable Diffusion形成了庞大的开源社区,并衍生出了许多有趣的应用。
本文将介绍如何使用stable-diffusion-webui在PAI-DSW上实现SD模型的推理。
Code
Markdown
运行环境要求
Code
Markdown
推荐使用GPU机型 A10 or V100
根据报错信息,这个错误是由于Python版本不兼容导致的。你当前的Python版本是3.6.12,但该程序需要使用3.10.6版本的Python。
你可以按照以下步骤解决该问题:
下载并安装 Python 3.10.6 版本,你可以从这里下载:https://www.python.org/downloads/release/python-3109/
安装完毕后,删除当前的Python和"venv"文件夹,确保之后使用的是新安装的Python版本。
在命令行中运行安装指令,在WebUI的目录下运行以下命令:
python3 -m pip install gfpgan
这样应该可以解决安装gfpgan时出现的问题。如果问题仍然存在,请提供更多详细的错误信息,以便我能够更好地帮助你解决问题。
从错误信息中可以看出,部署stable-diffusion-webui
时出现了启动错误。错误信息显示在安装gfpgan
过程中发生了问题。
具体的错误信息是:
RuntimeError: Couldn't install gfpgan.
Command: "/mnt/workspace/demos/stable_diffusion_webui/stable-diffusion-webui/venv/bin/python3" -m pip install git+https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379 --prefer-binary
Error code: 1
stdout: Looking in indexes: https://mirrors.cloud.aliyuncs.com/pypi/simple
Collecting git+https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379
Cloning https://github.com/TencentARC/GFPGAN.git (to revision 8d2447a2d918f8eba5a4a01463fd48e45126a379) to /tmp/pip-req-build-skd_6x7m
...
Could not find a version that satisfies the requirement tomli>=2.0.1 (from yapf->gfpgan==1.3.5) (from versions: 0.2.0, 0.2.1, 0.2.2, 0.2.3, 0.2.4, 0.2.5, 0.2.6, 0.2.7, 0.2.8, 0.2.9, 0.2.10, 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.1.0, 1.2.0, 1.2.1, 1.2.2, 1.2.3)
No matching distribution found for tomli>=2.0.1 (from yapf->gfpgan==1.3.5)
根据错误信息,安装gfpgan
失败是因为无法找到满足要求的依赖库tomli>=2.0.1
。
建议尝试以下解决方法:
python -m pip install --upgrade pip
.yapf
和gfpgan
的文档或官方支持渠道,寻求更多关于依赖问题的帮助。版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。