Skip to content

auto (AUTOMATIC1111): TypeError: AsyncConnectionPool.__init__() got an unexpected keyword argument 'socket_options' #608

Closed
@cyril23

Description

@cyril23

Has this issue been opened before?

  • It is not in the FAQ, I checked.
  • It is not in the issues, I searched.

Describe the bug

I've tried to run the auto (AUTOMATIC1111) UI, following the wiki, and get the following error:

:~/stable-diffusion-webui-docker$ docker compose --profile auto up --build
[+] Building 0.9s (32/32) FINISHED                                                                                                            docker:default
 => [auto internal] load build definition from Dockerfile                                                                                               0.0s
 => => transferring dockerfile: 4.13kB                                                                                                                  0.0s
 => [auto internal] load .dockerignore                                                                                                                  0.0s
 => => transferring context: 2B                                                                                                                         0.0s
 => [auto internal] load metadata for docker.io/library/python:3.10.9-slim                                                                              0.8s
 => [auto internal] load metadata for docker.io/alpine/git:2.36.2                                                                                       0.8s
 => [auto internal] load metadata for docker.io/library/alpine:3.17                                                                                     0.8s
 => [auto internal] load build context                                                                                                                  0.0s
 => => transferring context: 149B                                                                                                                       0.0s
 => [auto download 1/8] FROM docker.io/alpine/git:2.36.2@sha256:ec491c893597b68c92b88023827faa771772cfd5e106b76c713fa5e1c75dea84                        0.0s
 => [auto xformers 1/3] FROM docker.io/library/alpine:3.17@sha256:f71a5f071694a785e064f05fed657bf8277f1b2113a8ed70c90ad486d6ee54dc                      0.0s
 => [auto stage-2  1/14] FROM docker.io/library/python:3.10.9-slim@sha256:76dd18d90a3d8710e091734bf2c9dd686d68747a51908db1e1f41e9a5ed4e2c5              0.0s
 => CACHED [auto stage-2  2/14] RUN --mount=type=cache,target=/var/cache/apt   apt-get update &&   apt-get install -y fonts-dejavu-core rsync git jq m  0.0s
 => CACHED [auto stage-2  3/14] RUN --mount=type=cache,target=/cache --mount=type=cache,target=/root/.cache/pip   aria2c -x 5 --dir /cache --out torch  0.0s
 => CACHED [auto stage-2  4/14] RUN --mount=type=cache,target=/root/.cache/pip   git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git  0.0s
 => CACHED [auto xformers 2/3] RUN apk add --no-cache aria2                                                                                             0.0s
 => CACHED [auto xformers 3/3] RUN aria2c -x 5 --dir / --out wheel.whl 'https://github.com/AbdBarho/stable-diffusion-webui-docker/releases/download/6.  0.0s
 => CACHED [auto stage-2  5/14] RUN --mount=type=cache,target=/root/.cache/pip    --mount=type=bind,from=xformers,source=/wheel.whl,target=/xformers-0  0.0s
 => CACHED [auto download 2/8] COPY clone.sh /clone.sh                                                                                                  0.0s
 => CACHED [auto download 3/8] RUN . /clone.sh stable-diffusion-stability-ai https://github.com/Stability-AI/stablediffusion.git cf1d67a6fd5ea1aa600c4  0.0s
 => CACHED [auto download 4/8] RUN . /clone.sh CodeFormer https://github.com/sczhou/CodeFormer.git c5b4593074ba6214284d6acd5f1719b6c5d739af   && rm -r  0.0s
 => CACHED [auto download 5/8] RUN . /clone.sh BLIP https://github.com/salesforce/BLIP.git 48211a1594f1321b00f14c9f7a5b4813144b2fb9                     0.0s
 => CACHED [auto download 6/8] RUN . /clone.sh k-diffusion https://github.com/crowsonkb/k-diffusion.git ab527a9a6d347f364e3d185ba6d714e22d80cb3c        0.0s
 => CACHED [auto download 7/8] RUN . /clone.sh clip-interrogator https://github.com/pharmapsychotic/clip-interrogator 2cf03aaf6e704197fd0dae7c7f96aa59  0.0s
 => CACHED [auto download 8/8] RUN . /clone.sh generative-models https://github.com/Stability-AI/generative-models 45c443b316737a4ab6e40413d7794a7f565  0.0s
 => CACHED [auto stage-2  6/14] COPY --from=download /repositories/ /stable-diffusion-webui/repositories/                                               0.0s
 => CACHED [auto stage-2  7/14] RUN mkdir /stable-diffusion-webui/interrogate && cp /stable-diffusion-webui/repositories/clip-interrogator/clip_interr  0.0s
 => CACHED [auto stage-2  8/14] RUN --mount=type=cache,target=/root/.cache/pip   pip install -r /stable-diffusion-webui/repositories/CodeFormer/requir  0.0s
 => CACHED [auto stage-2  9/14] RUN --mount=type=cache,target=/root/.cache/pip   pip install pyngrok   git+https://github.com/TencentARC/GFPGAN.git@8d  0.0s
 => CACHED [auto stage-2 10/14] RUN apt-get -y install libgoogle-perftools-dev && apt-get clean                                                         0.0s
 => CACHED [auto stage-2 11/14] RUN --mount=type=cache,target=/root/.cache/pip   cd stable-diffusion-webui &&   git fetch &&   git reset --hard 5ef669  0.0s
 => CACHED [auto stage-2 12/14] COPY . /docker                                                                                                          0.0s
 => CACHED [auto stage-2 13/14] RUN   python3 /docker/info.py /stable-diffusion-webui/modules/ui.py &&   mv /stable-diffusion-webui/style.css /stable-  0.0s
 => CACHED [auto stage-2 14/14] WORKDIR /stable-diffusion-webui                                                                                         0.0s
 => [auto] exporting to image                                                                                                                           0.0s
 => => exporting layers                                                                                                                                 0.0s
 => => writing image sha256:69edf3b65bda9c9842dbc8a1a7ec6c066ae531883dbf02352e37f3541c66ec59                                                            0.0s
 => => naming to docker.io/library/sd-auto:67                                                                                                           0.0s
[+] Running 1/0
 ✔ Container webui-docker-auto-1  Created                                                                                                               0.0s
Attaching to webui-docker-auto-1
webui-docker-auto-1  | Mounted .cache
webui-docker-auto-1  | Mounted config_states
webui-docker-auto-1  | Mounted .cache
webui-docker-auto-1  | Mounted embeddings
webui-docker-auto-1  | Mounted config.json
webui-docker-auto-1  | Mounted models
webui-docker-auto-1  | Mounted styles.csv
webui-docker-auto-1  | Mounted ui-config.json
webui-docker-auto-1  | Mounted extensions
webui-docker-auto-1  | Installing extension dependencies (if any)
webui-docker-auto-1  | Traceback (most recent call last):
webui-docker-auto-1  |   File "/stable-diffusion-webui/webui.py", line 13, in <module>
webui-docker-auto-1  |     initialize.imports()
webui-docker-auto-1  |   File "/stable-diffusion-webui/modules/initialize.py", line 21, in imports
webui-docker-auto-1  |     import gradio  # noqa: F401
webui-docker-auto-1  |   File "/usr/local/lib/python3.10/site-packages/gradio/__init__.py", line 3, in <module>
webui-docker-auto-1  |     import gradio.components as components
webui-docker-auto-1  |   File "/usr/local/lib/python3.10/site-packages/gradio/components/__init__.py", line 1, in <module>
webui-docker-auto-1  |     from gradio.components.annotated_image import AnnotatedImage
webui-docker-auto-1  |   File "/usr/local/lib/python3.10/site-packages/gradio/components/annotated_image.py", line 12, in <module>
webui-docker-auto-1  |     from gradio import utils
webui-docker-auto-1  |   File "/usr/local/lib/python3.10/site-packages/gradio/utils.py", line 353, in <module>
webui-docker-auto-1  |     class AsyncRequest:
webui-docker-auto-1  |   File "/usr/local/lib/python3.10/site-packages/gradio/utils.py", line 372, in AsyncRequest
webui-docker-auto-1  |     client = httpx.AsyncClient()
webui-docker-auto-1  |   File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1397, in __init__
webui-docker-auto-1  |     self._transport = self._init_transport(
webui-docker-auto-1  |   File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1445, in _init_transport
webui-docker-auto-1  |     return AsyncHTTPTransport(
webui-docker-auto-1  |   File "/usr/local/lib/python3.10/site-packages/httpx/_transports/default.py", line 275, in __init__
webui-docker-auto-1  |     self._pool = httpcore.AsyncConnectionPool(
webui-docker-auto-1  | TypeError: AsyncConnectionPool.__init__() got an unexpected keyword argument 'socket_options'
webui-docker-auto-1 exited with code 1

Which UI

auto

Hardware / Software

  • OS: Ubuntu
  • OS version: Ubuntu 20.04.6 LTS
  • WSL version (if applicable):
  • Docker Version: 24.0.6
  • Docker compose version: v2.21.0
  • Repo version: I've tried both master and git checkout tags/8.1.0
  • RAM: 16 GB
  • GPU/VRAM: 23028MiB

Steps to Reproduce

git clone https://github.com/AbdBarho/stable-diffusion-webui-docker.git
cd stable-diffusion-webui-docker/
# instead of master branch I've also tried git checkout tags/8.1.0, same results
docker compose --profile download up --build
docker compose --profile auto up --build

Additional context

$ nvidia-smi
Sat Nov  4 15:14:53 2023
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.104.12             Driver Version: 535.104.12   CUDA Version: 12.2     |
|-----------------------------------------+----------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |         Memory-Usage | GPU-Util  Compute M. |
|                                         |                      |               MIG M. |
|=========================================+======================+======================|
|   0  NVIDIA A10G                    On  | 00000000:00:1E.0 Off |                    0 |
|  0%   28C    P8              16W / 300W |      2MiB / 23028MiB |      0%      Default |
|                                         |                      |                  N/A |
+-----------------------------------------+----------------------+----------------------+

+---------------------------------------------------------------------------------------+
| Processes:                                                                            |
|  GPU   GI   CI        PID   Type   Process name                            GPU Memory |
|        ID   ID                                                             Usage      |
|=======================================================================================|
|  No running processes found                                                           |
+---------------------------------------------------------------------------------------+
$ uname -a
Linux ip-xxx-xxx-xxx-xxx 5.15.0-1048-aws #53~20.04.1-Ubuntu SMP Wed Oct 4 16:44:20 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Using a Amazon g5.xlarge instance (NVIDIA A10G Tensor-Core-GPU) with an EC2 Deep Learning Base GPU AMI (Ubuntu 20.04) 20231026 (ami-0d134e01570c1e7b4) image.

By the way, trying the invoke UI doesn't work either for me, see #595 (comment)

Side note

On a completely different setup on a Google g2-standard-4 machine (Nvidia L4) with a "Deep Learning VM with CUDA 12.1 M112" (c0-deeplearning-common-cu121-v20230925-debian-11-py310) image, I've successfully started AUTOMATIC without Docker but using https://github.com/AUTOMATIC1111/stable-diffusion-webui directly via

export CUDAVERSION=121
pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu$CUDAVERSION && \
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui && \
cd stable-diffusion-webui && \
git checkout tags/v1.6.0 && \
cd ~/stable-diffusion-webui/models/Stable-diffusion && \
# wget "https://civitai.com/api/download/models/130072" -O realisticVisionV51_v51VAE.safetensors && \
wget "https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.safetensors" -O "v1-5-pruned-emaonly.safetensors" && \
# wget "https://huggingface.co/runwayml/stable-diffusion-inpainting/resolve/main/sd-v1-5-inpainting.ckpt" -O "sd-v1-5-inpainting.ckpt" && \
cd ~/stable-diffusion-webui && \
wget "https://github.com/TencentARC/GFPGAN/releases/download/v1.3.4/GFPGANv1.4.pth" -O GFPGANv1.4.pth && \
cd ~/stable-diffusion-webui/ && \
python3 launch.py --listen

but sometimes on python3 launch.py I see the same error got an unexpected keyword argument 'socket_options', but according to the following issues on the https://github.com/AUTOMATIC1111/stable-diffusion-webui/ repo:

I could fix it as follows:

cd ~/stable-diffusion-webui/ && \
pip install -U pip && \
pip install -U httpcore && \
pip3 install httpx==0.24.1
# and then this works:
python3 launch.py --listen

But in this https://github.com/AbdBarho/stable-diffusion-webui-docker repo I don't know how to apply this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions