l1na-forever / stable-diffusion-rocm-docker

Stable Diffusion Docker image preconfigured for usage with AMD Radeon cards
126 stars 23 forks source link

having a problem with the WebUI #12

Open emaxoda opened 1 year ago

emaxoda commented 1 year ago

I'm having this exact problem with the webui pulling the lastest docker image https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/4833

Python 3.7.13 (default, Mar 29 2022, 02:18:16) 
[GCC 7.5.0]
Commit hash: 08b3f7aef15f74f4d2254b1274dd66fcc7940348
Installing gfpgan
Installing clip
Cloning Stable Diffusion into repositories/stable-diffusion...
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: --precision full --no-half
Traceback (most recent call last):
  File "launch.py", line 169, in <module>
    start_webui()
  File "launch.py", line 163, in start_webui
    import webui
  File "/sd/webui.py", line 12, in <module>
    from modules import devices, sd_samplers
  File "/sd/modules/sd_samplers.py", line 10, in <module>
    from modules import prompt_parser, devices, processing
  File "/sd/modules/processing.py", line 13, in <module>
    import modules.sd_hijack
  File "/sd/modules/sd_hijack.py", line 10, in <module>
    import modules.textual_inversion.textual_inversion
  File "/sd/modules/textual_inversion/textual_inversion.py", line 12, in <module>
    from modules import shared, devices, sd_hijack, processing, sd_models
  File "/sd/modules/shared.py", line 7, in <module>
    import gradio as gr
  File "/opt/conda/lib/python3.7/site-packages/gradio/__init__.py", line 3, in <module>
    import gradio.components as components
  File "/opt/conda/lib/python3.7/site-packages/gradio/components.py", line 39, in <module>
    from gradio import media_data, processing_utils, utils
  File "/opt/conda/lib/python3.7/site-packages/gradio/processing_utils.py", line 17, in <module>
    from gradio import encryptor, utils
  File "/opt/conda/lib/python3.7/site-packages/gradio/utils.py", line 33, in <module>
    import httpx
  File "/opt/conda/lib/python3.7/site-packages/httpx/__init__.py", line 2, in <module>
    from ._api import delete, get, head, options, patch, post, put, request, stream
  File "/opt/conda/lib/python3.7/site-packages/httpx/_api.py", line 4, in <module>
    from ._client import Client
  File "/opt/conda/lib/python3.7/site-packages/httpx/_client.py", line 29, in <module>
    from ._transports.default import AsyncHTTPTransport, HTTPTransport
  File "/opt/conda/lib/python3.7/site-packages/httpx/_transports/default.py", line 30, in <module>
    import httpcore
  File "/opt/conda/lib/python3.7/site-packages/httpcore/__init__.py", line 1, in <module>
    from ._api import request, stream
  File "/opt/conda/lib/python3.7/site-packages/httpcore/_api.py", line 5, in <module>
    from ._sync.connection_pool import ConnectionPool
  File "/opt/conda/lib/python3.7/site-packages/httpcore/_sync/__init__.py", line 1, in <module>
    from .connection import HTTPConnection
  File "/opt/conda/lib/python3.7/site-packages/httpcore/_sync/connection.py", line 13, in <module>
    from .http11 import HTTP11Connection
  File "/opt/conda/lib/python3.7/site-packages/httpcore/_sync/http11.py", line 44, in <module>
    class HTTP11Connection(ConnectionInterface):
  File "/opt/conda/lib/python3.7/site-packages/httpcore/_sync/http11.py", line 140, in HTTP11Connection
    self, event: h11.Event, timeout: Optional[float] = None
AttributeError: module 'h11' has no attribute 'Event'
synapseattack commented 1 year ago

This has to do with the httpcore version that is being used. It has been discussed in bug 4833 of the webui project.

ida-greuelr commented 1 year ago

Temporary workaround, after executing the docker run command for the first time and having the instance being exited. Restart the existing container instance:

docker start --interactive <container-name>

and execute in parallel in another shell the recommended fix mentioned in bug 4833:

docker exec <container-name> pip install --force-reinstall httpcore==0.15

This will reinstall the broken httpcore package while the container is starting preparing the needed resources. You will have to do this as quick as possible.

hydrian commented 1 year ago

@l1na-forever Do you think this should be closed?