(aigc) [root@iZuf68l98edm5r88x8wc23Z stable-diffusion-webui]# python launch.py --listen --lowvram --no-half --skip-torch-cuda-test
Python 3.10.6 (main, Oct 24 2022, 16:07:47) [GCC 11.2.0]
Commit hash: 0cc0ee1bcb4c24a8c9715f66cede06601bfc00c8
Cloning Stable Diffusion into repositories/stable-diffusion-stability-ai...
Cloning Taming Transformers into repositories/taming-transformers...
Cloning K-diffusion into repositories/k-diffusion...
Cloning CodeFormer into repositories/CodeFormer...
Cloning BLIP into repositories/BLIP...
Installing requirements for CodeFormer
Installing requirements for Web UI
Launching Web UI with arguments: --listen --lowvram --no-half --ckpt /root/models/Stable-diffusion/v1-5-pruned-emaonly.safetensors --lora-dir /root/models/Lora
Traceback (most recent call last):
File "/root/stable-diffusion-webui/launch.py", line 361, in
start()
File "/root/stable-diffusion-webui/launch.py", line 352, in start
import webui
File "/root/stable-diffusion-webui/webui.py", line 15, in
from modules import import_hook, errors, extra_networks, ui_extra_networks_checkpoints
File "/root/stable-diffusion-webui/modules/ui_extra_networks_checkpoints.py", line 6, in
from modules import shared, ui_extra_networks, sd_models
File "/root/stable-diffusion-webui/modules/shared.py", line 9, in
import gradio as gr
File "/root/.conda/envs/aigc/lib/python3.10/site-packages/gradio/init.py", line 3, in
import gradio.components as components
File "/root/.conda/envs/aigc/lib/python3.10/site-packages/gradio/components.py", line 34, in
from gradio import media_data, processing_utils, utils
File "/root/.conda/envs/aigc/lib/python3.10/site-packages/gradio/processing_utils.py", line 23, in
from gradio import encryptor, utils
File "/root/.conda/envs/aigc/lib/python3.10/site-packages/gradio/utils.py", line 416, in
class AsyncRequest:
File "/root/.conda/envs/aigc/lib/python3.10/site-packages/gradio/utils.py", line 436, in AsyncRequest
client = httpx.AsyncClient()
File "/root/.conda/envs/aigc/lib/python3.10/site-packages/httpx/_client.py", line 1397, in init
self._transport = self._init_transport(
File "/root/.conda/envs/aigc/lib/python3.10/site-packages/httpx/_client.py", line 1445, in _init_transport
return AsyncHTTPTransport(
File "/root/.conda/envs/aigc/lib/python3.10/site-packages/httpx/_transports/default.py", line 275, in init
self._pool = httpcore.AsyncConnectionPool(
TypeError: AsyncConnectionPool.init() got an unexpected keyword argument 'socket_options'
(aigc) [root@iZuf67dgzituk5w39c2n0iZ stable-diffusion-webui]# python launch.py --listen --lowvram --no-half --skip-torch-cuda-test
Python 3.10.6 (main, Oct 24 2022, 16:07:47) [GCC 11.2.0]
Version: v1.6.0-2-g4afaaf8a
Commit hash: 4afaaf8a020c1df457bcf7250cb1c7f609699fa7
Cloning Stable Diffusion into /root/stable-diffusion-webui/repositories/stable-diffusion-stability-ai...
Cloning into '/root/stable-diffusion-webui/repositories/stable-diffusion-stability-ai'...
Username for 'https://gitee.com': xxxxx
Password for 'https://xxxxxx@gitee.com':
remote: [session-a944cf85] 404 not found!
fatal: repository 'https://gitee.com/xxx/stablediffusion.git/' not found
Traceback (most recent call last):
File "/root/stable-diffusion-webui/launch.py", line 48, in
main()
File "/root/stable-diffusion-webui/launch.py", line 39, in main
prepare_environment()
File "/root/stable-diffusion-webui/modules/launch_utils.py", line 380, in prepare_environment
git_clone(stable_diffusion_repo, repo_dir('stable-diffusion-stability-ai'), "Stable Diffusion", stable_diffusion_commit_hash)
File "/root/stable-diffusion-webui/modules/launch_utils.py", line 186, in git_clone
run(f'"{git}" clone "{url}" "{dir}"', f"Cloning {name} into {dir}...", f"Couldn't clone {name}", live=True)
File "/root/stable-diffusion-webui/modules/launch_utils.py", line 115, in run
raise RuntimeError("\n".join(error_bits))
RuntimeError: Couldn't clone Stable Diffusion.
Command: "git" clone "https://gitee.com/xxx/stablediffusion.git" "/root/stable-diffusion-webui/repositories/stable-diffusion-stability-ai"
Error code: 128
(aigc) [root@iZuf67dgzituk5w39c2n0iZ stable-diffusion-webui]#
启动UI,报错
错误消息表明AsyncConnectionPool.init()
方法收到了意外的关键字参数'socket_options'。这可能是由于httpx
库的版本不兼容或存在错误。
要解决此问题,你可以尝试以下步骤:
使用以下命令将httpx
库更新到最新版本:
pip install --upgrade httpx
如果更新库后仍无法解决问题,你可以尝试降级到httpx
库的先前版本,以查看是否可以解决问题:
pip install httpx==<version>
看起来你遇到了一个TypeError错误,提示“AsyncConnectionPool.init() got an unexpected keyword argument 'socket_options'”。这可能是由于使用的httpcore库版本与gradio不兼容导致的问题。建议你可以尝试更新httpcore库到最新版本,或者回退到与当前gradio版本兼容的httpcore版本。也可以在安装gradio之前先安装httpcore,以确保使用了兼容的版本。请按照以下步骤尝试解决这个问题:
删除现有的httpcore库,命令如下:
pip uninstall httpcore
安装与当前gradio版本兼容的httpcore库,命令如下:
pip install "httpcore<0.14"
重新运行python launch.py命令,看看是否能够解决问题。如果仍然有问题,请考虑尝试其他解决方案,比如更新gradio版本或者更改操作系统环境。
这段代码看起来像是Python代码执行时报错了,提示 TypeError 错误。根据错误信息来看,“AsyncConnectionPool.init() got an unexpected keyword argument 'socket_options'”,错误的原因应该是当前版本的HTTPX库不兼容 socket_options 参数。你可以尝试更新httpx库版本至最新版本解决这个问题,命令如下:
pip install -U "httpx[async]"
在更新之前确认你当前正在使用的Python版本是否支持最新版本的httpx库。
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。