开发者社区> 问答> 正文

部署Stable Diffusion玩转AI绘画(CPU版)实验报错,无法启动

(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'

展开
收起
1301095088899815 2023-11-08 11:23:14 2714 25
4 条回答
写回答
取消 提交回答
  • (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,报错

    2023-11-27 15:19:18
    赞同 10 展开评论 打赏
  • 错误消息表明AsyncConnectionPool.init()方法收到了意外的关键字参数'socket_options'。这可能是由于httpx库的版本不兼容或存在错误。

    要解决此问题,你可以尝试以下步骤:

    1. 使用以下命令将httpx库更新到最新版本:

      pip install --upgrade httpx
      
    2. 如果更新库后仍无法解决问题,你可以尝试降级到httpx库的先前版本,以查看是否可以解决问题:

      pip install httpx==<version>
      
    2023-11-16 10:41:35
    赞同 11 展开评论 打赏
  • 面对过去,不要迷离;面对未来,不必彷徨;活在今天,你只要把自己完全展示给别人看。

    看起来你遇到了一个TypeError错误,提示“AsyncConnectionPool.init() got an unexpected keyword argument 'socket_options'”。这可能是由于使用的httpcore库版本与gradio不兼容导致的问题。建议你可以尝试更新httpcore库到最新版本,或者回退到与当前gradio版本兼容的httpcore版本。也可以在安装gradio之前先安装httpcore,以确保使用了兼容的版本。请按照以下步骤尝试解决这个问题:

    1. 删除现有的httpcore库,命令如下:

      pip uninstall httpcore
      
    2. 安装与当前gradio版本兼容的httpcore库,命令如下:

      pip install "httpcore<0.14"
      
    3. 重新运行python launch.py命令,看看是否能够解决问题。如果仍然有问题,请考虑尝试其他解决方案,比如更新gradio版本或者更改操作系统环境。

    2023-11-11 14:10:46
    赞同 8 展开评论 打赏
  • 这段代码看起来像是Python代码执行时报错了,提示 TypeError 错误。根据错误信息来看,“AsyncConnectionPool.init() got an unexpected keyword argument 'socket_options'”,错误的原因应该是当前版本的HTTPX库不兼容 socket_options 参数。你可以尝试更新httpx库版本至最新版本解决这个问题,命令如下:

    pip install -U "httpx[async]"
    

    在更新之前确认你当前正在使用的Python版本是否支持最新版本的httpx库。

    2023-11-08 14:55:08
    赞同 8 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
Data+AI时代大数据平台应该如何建设 立即下载
通义万相:视觉生成大模型的进化与应用 立即下载
RDS SQL Server CPU高使用率性能优化 立即下载