AUTOMATIC1111 / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
139.89k stars 26.5k forks source link

[Bug]: error when running webui.sh #13236

Closed dongyun-kim-arch closed 1 year ago

dongyun-kim-arch commented 1 year ago

Is there an existing issue for this?

What happened?

Clone this repository (1.6) and it doesn't work.

Steps to reproduce the problem

  1. git clone sd-webui auto1111 recent repo (1.6)
  2. bash webui.sh
  3. error pops up

What should have happened?

The model should run...

Sysinfo

Ubuntu20.04

What browsers do you use to access the UI ?

No response

Console logs

Launching Web UI with arguments: 
Traceback (most recent call last):
  File "launch.py", line 48, in <module>
    main()
  File "launch.py", line 44, in main
    start()
  File "/home/causer/Desktop/seg/stable-diffusion-webui/modules/launch_utils.py", line 432, in start
    import webui
  File "/home/causer/Desktop/seg/stable-diffusion-webui/webui.py", line 13, in <module>
    initialize.imports()
  File "/home/causer/Desktop/seg/stable-diffusion-webui/modules/initialize.py", line 21, in imports
    import gradio  # noqa: F401
  File "/home/causer/Desktop/seg/stable-diffusion-webui/venv/lib/python3.8/site-packages/gradio/__init__.py", line 3, in <module>
    import gradio.components as components
  File "/home/causer/Desktop/seg/stable-diffusion-webui/venv/lib/python3.8/site-packages/gradio/components/__init__.py", line 1, in <module>
    from gradio.components.annotated_image import AnnotatedImage
  File "/home/causer/Desktop/seg/stable-diffusion-webui/venv/lib/python3.8/site-packages/gradio/components/annotated_image.py", line 12, in <module>
    from gradio import utils
  File "/home/causer/Desktop/seg/stable-diffusion-webui/venv/lib/python3.8/site-packages/gradio/utils.py", line 353, in <module>
    class AsyncRequest:
  File "/home/causer/Desktop/seg/stable-diffusion-webui/venv/lib/python3.8/site-packages/gradio/utils.py", line 372, in AsyncRequest
    client = httpx.AsyncClient()
  File "/home/causer/Desktop/seg/stable-diffusion-webui/venv/lib/python3.8/site-packages/httpx/_client.py", line 1397, in __init__
    self._transport = self._init_transport(
  File "/home/causer/Desktop/seg/stable-diffusion-webui/venv/lib/python3.8/site-packages/httpx/_client.py", line 1445, in _init_transport
    return AsyncHTTPTransport(
  File "/home/causer/Desktop/seg/stable-diffusion-webui/venv/lib/python3.8/site-packages/httpx/_transports/default.py", line 275, in __init__
    self._pool = httpcore.AsyncConnectionPool(
TypeError: __init__() got an unexpected keyword argument 'socket_options'

Additional information

No response

anonymoussss commented 1 year ago

have the same question ๐Ÿ˜ญ

dongyun-kim-arch commented 1 year ago

Resolved this issue by updating SD v1.6 It seems the issue is related to the version... To use sd v1.6, python 3.10 is required.

anonymoussss commented 1 year ago

Thank you for your quick reply! Do you mean to update python to 3.10? I saw that you cloned the 1.6 repository before

CrossNox commented 1 year ago

I fixed it with

pip install -U pip
pip install -U httpcore
anonymoussss commented 1 year ago

Thanks for everyone so much, but all the modifications are not useful to me. ๐Ÿ˜ญ I have tried SD version from 1.0.0 to 1.6.0, but still not work. When using SD version greater than 1.3.1, report an error: "TypeError: init() got an unexpected keyword argument 'socket_options'" . When using SD version less than 1.3.1, an error "ImportError: cannot import name 'Undefined' from" will be reported. 'pydantic.fields' (/home/user/stable-diffusion-webui/venv/lib/python3.8/site-packages/pydantic/fields.py)". I am running sdwebui in docker+python3.8. It seems that I need to change the operating environment.

dongyun-kim-arch commented 1 year ago

Solution:

Create conda environment: $ conda create -y -n stable-diffusion python=3.10

Edit the following line of webui-user.sh: python_cmd="/home/USER_NAME/anaconda3/envs/stable-diffusion/bin/python3"

Run: bash webui.sh

i-Showtime commented 1 year ago

Solution that ended up working form me: Delete VENV folder regenerate with

python3.10 -m venv venv

13054 might be related

luyvlei commented 1 year ago
cd stable-diffusion-webui && source venv/bin/activate
pip3 install httpx==0.24.1
ClashSAN commented 1 year ago

The wiki for webui helps for showing installation on linux, apt install python3.10-venv and make a venv with python3.10 if your system version is different. https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Install-and-Run-on-NVidia-GPUs#linux

anonymoussss commented 1 year ago
cd stable-diffusion-webui && source venv/bin/activate
pip3 install httpx==0.24.1

It works for me! Thanks.

MislavJuric commented 11 months ago

I got this error when I tried doing the following:

  1. I followed the instructions on Automatic Installation on Linux
  2. I executed chmod +x webui.sh
  3. I executed bash webui.sh -f (I used this subsequently to try to run Stable Diffusion Web UI)

Then, I systematically tried all of the fixes suggested in this thread, but none of them worked:

I tried installing Python 3.10 by following this guide (Option 1), then adding an alias to my .bashrc file (alias python="/usr/bin/python3.10") so that the Python which gets executed when I execute python is actually Python 3.10. That didn't help with the error.

Then I activated the virtual environment by running source venv/bin/activate and I ran the following two commands:

  1. pip install -U pip
  2. pip install -U httpcore

After these commands, I got the following error. Here's the traceback:

(venv) root@C.7097089:~/stable-diffusion-webui$ bash webui.sh -f

################################################################
Install script for stable-diffusion + Web UI
Tested on Debian 11 (Bullseye)
################################################################

################################################################
Running on root user
################################################################

################################################################
Repo already cloned, using it as install directory
################################################################

################################################################
python venv already activate or run without venv: /root/stable-diffusion-webui/venv
################################################################

################################################################
Launching launch.py...
################################################################
Cannot locate TCMalloc (improves CPU memory usage)
Python 3.8.10 (default, May 26 2023, 14:05:08) 
[GCC 9.4.0]
Version: v1.6.0
Commit hash: 5ef669de080814067961f28357256e8fe27544f4
Installing requirements
Launching Web UI with arguments: -f
no module 'xformers'. Processing without...
no module 'xformers'. Processing without...
Traceback (most recent call last):
  File "launch.py", line 48, in <module>
    main()
  File "launch.py", line 44, in main
    start()
  File "/root/stable-diffusion-webui/modules/launch_utils.py", line 432, in start
    import webui
  File "/root/stable-diffusion-webui/webui.py", line 13, in <module>
    initialize.imports()
  File "/root/stable-diffusion-webui/modules/initialize.py", line 33, in imports
    from modules import shared_init
  File "/root/stable-diffusion-webui/modules/shared_init.py", line 5, in <module>
    from modules import shared
  File "/root/stable-diffusion-webui/modules/shared.py", line 5, in <module>
    from modules import shared_cmd_options, shared_gradio_themes, options, shared_items, sd_models_types
  File "/root/stable-diffusion-webui/modules/options.py", line 74, in <module>
    class Options:
  File "/root/stable-diffusion-webui/modules/options.py", line 77, in Options
    def __init__(self, data_labels: dict[str, OptionInfo], restricted_opts):
TypeError: 'type' object is not subscriptable

I then tried pip3 install httpx==0.24.1 (still while inside the venv). It didn't fix the error above.

Since I got this error as a consequence of solving the original error in this thread, I am posting this here. I re-created this issue on multiple machines (I am using vast.ai).

Does someone have a fix for this?

myInstagramAlternative commented 11 months ago

https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/12884#issuecomment-1701838715 This solved TypeError: 'type' object is not subscriptable.

I assume same I previously got this error also because of wrong py version.

Make sure you are on 3.10+

victorbarlac commented 10 months ago
cd stable-diffusion-webui && source venv/bin/activate
pip3 install httpx==0.24.1

It works for me! Thanks.

That worked for me, but I just needed that: pip3 install httpx==0.24.1

Alex212192 commented 10 months ago
cd stable-diffusion-webui && source venv/bin/activate
pip3 install httpx==0.24.1

It works for me! Thanks.

That worked for me, but I just needed that: pip3 install httpx==0.24.1

hi, could you please explain where should i type those text?

BenjaminIrwin commented 10 months ago
cd stable-diffusion-webui && source venv/bin/activate
pip3 install httpx==0.24.1

It works for me! Thanks.

That worked for me, but I just needed that: pip3 install httpx==0.24.1

hi, could you please explain where should i type those text?

in terminal.

Also experiencing this bug for the first time today.

infinitedarkw commented 10 months ago

I have the same bug today. Anyone have advice how to solve it in Google Colab? TypeError: AsyncConnectionPool.__init__() got an unexpected keyword argument 'socket_options'

Ive tried some of the above but get syntax errors. Do I have to reinstall my entire Stable Diffusion/ Python environment?

I am a newbie, so treating me like the infant I am in explanations would be much appreciated. Thanks!

barbaram123 commented 10 months ago

Hello! I have a NVIDIA Quadro RTX 6000, and i have the same error message : " TypeError: AsyncConnectionPool.init() got an unexpected keyword argument 'socket_options' ". I tried the solutions mentioned above but it doesn't seem to work for me. If anyone have an other solution that would be great. Thanks

poomshift commented 10 months ago

in google colab add these 2 line work for me !pip install httpx==0.24.0 !pip install gradio --upgrade

barbaram123 commented 10 months ago

in google colab add these 2 line work for me !pip install httpx==0.24.0 !pip install gradio --upgrade

And when it's not on google Colab? Because for me i run it locally and i tried everything but it doesn't work

KristianELewis commented 10 months ago

Just had this issue. I installed it yesterday and it was working fine. I deleted venv and reinstalled today and it started giving me this error.

Can confirm this fixed it for me.

cd stable-diffusion-webui && source venv/bin/activate
pip3 install httpx==0.24.1
shrimptuna2 commented 10 months ago

I'm getting this same error/problem with a fresh install of automatic1111 after installing python 3.10.6. None of the above has worked. Any ideas much appreciated.

huntchar commented 10 months ago

์ €๋Š” ์ด๋Ÿฐ ๋ฐฉ๋ฒ•์œผ๋กœ ํ•ด๊ฒฐ ํ–ˆ๋‹ค /content/sd-webui/venv/lib/python3.10/site-packages/httpx/_transports/default.py

์•ˆ์—์„œ 275๋ฒˆ์งธ ์ค„ self._pool = httpcore.AsyncConnectionPool ๋ž€ ์ œ์ผ ์•„๋ž˜์— socket_options=socket_option

์ด์ค„์„ ์ œ๊ฑฐ ํ•˜๊ณ  ๋‚œ๋’ค์— ๋˜์—ˆ๋‹ค

Line 275 in self._pool = httpcore.AsyncConnectionPool at the bottom of the column socket_options=socket_option

This happened after I removed this line:

Frederik1997 commented 10 months ago

venv "E:\stable-diffusion-webui\venv\Scripts\Python.exe" Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)] Version: v1.6.0 Commit hash: 5ef669de080814067961f28357256e8fe27544f4 Launching Web UI with arguments: Traceback (most recent call last): File "E:\stable-diffusion-webui\launch.py", line 48, in main() File "E:\stable-diffusion-webui\launch.py", line 44, in main start() File "E:\stable-diffusion-webui\modules\launch_utils.py", line 432, in start import webui File "E:\stable-diffusion-webui\webui.py", line 13, in initialize.imports() File "E:\stable-diffusion-webui\modules\initialize.py", line 21, in imports import gradio # noqa: F401 File "E:\stable-diffusion-webui\venv\lib\site-packages\gradio__init.py", line 3, in import gradio.components as components File "E:\stable-diffusion-webui\venv\lib\site-packages\gradio\components__init__.py", line 1, in from gradio.components.annotated_image import AnnotatedImage File "E:\stable-diffusion-webui\venv\lib\site-packages\gradio\components\annotated_image.py", line 12, in from gradio import utils File "E:\stable-diffusion-webui\venv\lib\site-packages\gradio\utils.py", line 353, in class AsyncRequest: File "E:\stable-diffusion-webui\venv\lib\site-packages\gradio\utils.py", line 372, in AsyncRequest client = httpx.AsyncClient() File "E:\stable-diffusion-webui\venv\lib\site-packages\httpx_client.py", line 1397, in init self._transport = self._init_transport( File "E:\stable-diffusion-webui\venv\lib\site-packages\httpx_client.py", line 1445, in _init_transport return AsyncHTTPTransport( File "E:\stable-diffusion-webui\venv\lib\site-packages\httpx_transports\default.py", line 275, in init__ self._pool = httpcore.AsyncConnectionPool( TypeError: AsyncConnectionPool.init() got an unexpected keyword argument 'socket_options'

Same problem. Anyone know how to solve it?

huntchar commented 10 months ago

E:\stable-diffusion-webui\venv\lib\site-packages\httpx_transports ๋กœ ๊ฐ€์‹œ๋ฉด default.py ์ด๋ž€ ํŒŒ์ผ์ด ์žˆ๋Š”๋ฐ ๊ทธ ํŒŒ์ด์ฌ ํŒŒ์ผ ํ…์ŠคํŠธ๋กœ ์—ฌ์‹œ๊ณ 

275๋ฒˆ์งธ ์ค„๋กœ๊ฐ€๋ฉด self._pool = httpcore.AsyncConnectionPool( ์ด๋ž€ ๋‚ด์šฉ์ด ์žˆ์Šต๋‹ˆ๋‹ค.

๊ฑฐ๊ธฐ์— ์ œ์ผ ์•„๋žซ์ค„์— ๊ฐ€๋ฉด socket_options = socket_option ์ธ๊ฐ€ ์ด๋Ÿฐ ์ค„ ์žˆ๋Š”๋ฐ ์ด ๋ถ€๋ถ„ ์ง€์šฐ์‹œ๊ณ  ์‹คํ–‰ํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค ์ „ ์ด๋ ‡๊ฒŒ ํ•ด๊ฒฐ ํ–ˆ์Šต๋‹ˆ๋‹ค.

shrimptuna2 commented 10 months ago

์ €๋Š” ์ด๋Ÿฐ ๋ฐฉ๋ฒ•์œผ๋กœ ํ•ด๊ฒฐ ํ–ˆ๋‹ค /content/sd-webui/venv/lib/python3.10/site-packages/httpx/_transports/default.py

์•ˆ์—์„œ 275๋ฒˆ์งธ ์ค„ self._pool = httpcore.AsyncConnectionPool ๋ž€ ์ œ์ผ ์•„๋ž˜์— socket_options=socket_option

์ด์ค„์„ ์ œ๊ฑฐ ํ•˜๊ณ  ๋‚œ๋’ค์— ๋˜์—ˆ๋‹ค

Line 275 in self._pool = httpcore.AsyncConnectionPool at the bottom of the column socket_options=socket_option

This happened after I removed this line:

Sorry, a bit new to this, but I don't know what you changed exactly? My file at Line 275 reads as:

self._pool = httpcore.AsyncConnectionPool( ssl_context=ssl_context, max_connections=limits.max_connections, max_keepalive_connections=limits.max_keepalive_connections, keepalive_expiry=limits.keepalive_expiry, http1=http1, http2=http2, uds=uds, local_address=local_address, retries=retries, socket_options=socket_options,

r2k-in-the-vortex commented 10 months ago

for me the issue was that automatically httpx 0.25.1 was installed, that don't work, the function prototype is different it doesn't have any socet_options argument, it has to be httpx 0.24.1

manually installing correct version worked for me

\stable-diffusion-webui> .\venv\Scripts\python.exe -m pip install httpx==0.24.1

So I'm thinking maybe there is something missing in requirements_versions.txt

barbaram123 commented 10 months ago

for me the issue was that automatically httpx 0.25.1 was installed, that don't work, the function prototype is different it doesn't have any socet_options argument, it has to be httpx 0.24.1

manually installing correct version worked for me

\stable-diffusion-webui> .\venv\Scripts\python.exe -m pip install httpx==0.24.1

So I'm thinking maybe there is something missing in requirements_versions.txt

So you solved this issue ?

huntchar commented 10 months ago

์ €๋Š” ์ด๋Ÿฌํ•œ ๋ฐฉ๋ฒ•์œผ๋กœ ์กฐ์น˜๋ฅผ ์ทจํ–ˆ์Šต๋‹ˆ๋‹ค /content/sd-webui/venv/lib/python3.10/site-packages/httpx/_transports/default.py 275๋ฒˆ์งธ ์ค„ self._pool = httpcore.AsyncConnectionPool ๋ž€ ์ œ์ผ ์•„๋ž˜์— ์†Œ์ผ“_options=socket_option ์ด์ค„์„ ์ œ๊ฑฐํ•˜๊ณ  ๋‚œ ๋’ค์— ์žˆ๋Š” self._pool์˜ 275ํ–‰ = httpcore.AsyncConnectionPool(์†Œ์ผ“_์˜ต์…˜=์†Œ์ผ“_์˜ต์…˜ ์—ด ํ•˜๋‹จ) ์ด ์ค„์„ ์ œ๊ฑฐํ•œ ํ›„์— ์ด๋Ÿฐ ์ผ์ด ์ผ์–ด๋‚ฌ์Šต๋‹ˆ๋‹ค.

์ฃ„์†กํ•ฉ๋‹ˆ๋‹ค. ์กฐ๊ธˆ ์ƒˆ๋กœ์šด ๋‚ด์šฉ์ž…๋‹ˆ๋‹ค. ์ •ํ™•ํžˆ ๋ฌด์—‡์„ ๋ณ€๊ฒฝํ–ˆ๋Š”์ง€ ๋ชจ๋ฅด๊ฒ ์Šต๋‹ˆ๋‹ค. Line 275์— ์žˆ๋Š” ๋‚ด ํŒŒ์ผ์€ ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.

self._pool = httpcore.asyncconnectionpool ( ssl_context = ssl_context, max_connections = limits.max_connections, max_keepalive_connection = limits.max_keepalive_connection, requal_expory = limits.keepalive_expory, http1 = http1. , uds = uds, local_address = local_address, retries = retries, ์†Œ์ผ“_์˜ต์…˜=์†Œ์ผ“_์˜ต์…˜,

I removed this part =>์†Œ์ผ“_์˜ต์…˜=์†Œ์ผ“_์˜ต์…˜

shrimptuna2 commented 10 months ago

์ €๋Š” ์ด๋Ÿฐ ๋ฐฉ๋ฒ•์œผ๋กœ ํ•ด๊ฒฐ ํ–ˆ๋‹ค /content/sd-webui/venv/lib/python3.10/site-packages/httpx/_transports/default.py ์•ˆ์—์„œ 275๋ฒˆ์งธ ์ค„ self._pool = httpcore.AsyncConnectionPool ๋ž€ ์ œ์ผ ์•„๋ž˜์— socket_options=socket_option ์ด์ค„์„ ์ œ๊ฑฐ ํ•˜๊ณ  ๋‚œ๋’ค์— ๋˜์—ˆ๋‹ค Line 275 in self._pool = httpcore.AsyncConnectionPool at the bottom of the column socket_options=socket_option This happened after I removed this line:

Sorry, a bit new to this, but I don't know what you changed exactly? My file at Line 275 reads as:

self._pool = httpcore.AsyncConnectionPool( ssl_context=ssl_context, max_connections=limits.max_connections, max_keepalive_connections=limits.max_keepalive_connections, keepalive_expiry=limits.keepalive_expiry, http1=http1, http2=http2, uds=uds, local_address=local_address, retries=retries, socket_options=socket_options,

This worked! Thank you very much!

huntchar commented 10 months ago

์ €๋Š” ์ด๋Ÿฐ ๋ฐฉ๋ฒ•์œผ๋กœ ํ•ด๊ฒฐํ–ˆ์—ˆ์Šต๋‹ˆ๋‹ค /content/sd-webui/venv/lib/python3.10/site-packages/httpx/_transports/default.py ํ•ด์•ผ 275๋ฒˆ์งธ ์ค„ self._pool = httpcore.AsyncConnectionPool ๋ž€ ์ œ์ผ ์•„๋ž˜์— ์†Œ์ผ“_options=socket_option ์ด์ค„์„ ์ œ๊ฑฐํ•˜๊ณ  ๋‚œ ๋’ค์— ๋น ์ง„ ์ค„ 275 in self._pool = httpcore.AsyncConnectionPool ์—ด ๋งจ ์•„๋ž˜์— ์žˆ๋Š” ์†Œ์ผ“_options=socket_option ์ด ๋ฌธ์ œ๋Š” ์ด ์ค„์„ ์ œ๊ฑฐํ•œ ํ›„์— ๋ฐœ์ƒํ–ˆ์Šต๋‹ˆ๋‹ค.

์ฃ„์†กํ•ฉ๋‹ˆ๋‹ค. ์กฐ๊ธˆ ์ƒˆ๋กœ์šด ๋‚ด์šฉ์ž…๋‹ˆ๋‹ค. ์ •ํ™•ํžˆ ๋ฌด์—‡์„ ๋ณ€๊ฒฝํ–ˆ๋Š”์ง€ ๋ชจ๋ฅด๊ฒ ์Šต๋‹ˆ๋‹ค. Line 275์— ์žˆ๋Š” ๋‚ด ํŒŒ์ผ์€ ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค. self._pool = httpcore.asyncconnectionpool (ssl_context = ssl_context, max_connections = limits.max_connections, max_keepalive_connection = limits.max_keepalive_connection, requal_expory = limits.keepalive_expory, http1 = http1. , uds = uds, local_address = local_address, retries = retries, ์†Œ์ผ“_์˜ต์…˜=์†Œ์ผ“_์˜ต์…˜,

์ด๊ฒƒ์ด ํšจ๊ณผ๊ฐ€ ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค! ๋งค์šฐ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค!

Haha thank you

r2k-in-the-vortex commented 10 months ago

So you solved this issue ?

only manually, need to test a proper fix, I think it should be as simple as setting correct version in requirements_versions.txt but my python-fu is weak so I'm unsure

Ydentity1 commented 10 months ago

E:\stable-diffusion-webui\venv\lib\site-packages\httpx_transports ๋กœ ๊ฐ€์‹œ๋ฉด default.py ์ด๋ž€ ํŒŒ์ผ์ด ์žˆ๋Š”๋ฐ ๊ทธ ํŒŒ์ด์ฌ ํŒŒ์ผ ํ…์ŠคํŠธ๋กœ ์—ฌ์‹œ๊ณ 

275๋ฒˆ์งธ ์ค„๋กœ๊ฐ€๋ฉด self._pool = httpcore.AsyncConnectionPool( ์ด๋ž€ ๋‚ด์šฉ์ด ์žˆ์Šต๋‹ˆ๋‹ค.

๊ฑฐ๊ธฐ์— ์ œ์ผ ์•„๋žซ์ค„์— ๊ฐ€๋ฉด socket_options = socket_option ์ธ๊ฐ€ ์ด๋Ÿฐ ์ค„ ์žˆ๋Š”๋ฐ ์ด ๋ถ€๋ถ„ ์ง€์šฐ์‹œ๊ณ  ์‹คํ–‰ํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค ์ „ ์ด๋ ‡๊ฒŒ ํ•ด๊ฒฐ ํ–ˆ์Šต๋‹ˆ๋‹ค.

์ด๋ ‡๊ฒŒ ํ•˜๋‹ˆ๊นŒ ๋˜๋„ค! ๊ณ ๋งˆ์›Œ

huntchar commented 10 months ago

E:\stable-diffusion-webui\venv\lib\site-packages\httpx_transports ๋กœ ๊ฐ€์‹œ๋ฉด default.py ์ด๋ž€ ํŒŒ์ผ์ด ์žˆ๋Š”๋ฐ ๊ทธ ํŒŒ์ด์ฌ ํŒŒ์ผ ํ…์ŠคํŠธ๋กœ ์—ฌ์‹œ๊ณ 

275๋ฒˆ์งธ ์ค„๋กœ๊ฐ€๋ฉด self._pool = httpcore.AsyncConnectionPool( ์ด๋ž€ ๋‚ด์šฉ์ด ์žˆ์Šต๋‹ˆ๋‹ค.

๊ฑฐ๊ธฐ์— ์ œ์ผ ์•„๋žซ์ค„์— ๊ฐ€๋ฉด socket_options = socket_option ์ธ๊ฐ€ ์ด๋Ÿฐ ์ค„ ์žˆ๋Š”๋ฐ ์ด ๋ถ€๋ถ„ ์ง€์šฐ์‹œ๊ณ  ์‹คํ–‰ํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค ์ „ ์ด๋ ‡๊ฒŒ ํ•ด๊ฒฐ ํ–ˆ์Šต๋‹ˆ๋‹ค.

์ด๋ ‡๊ฒŒ ํ•˜๋‹ˆ๊นŒ ๋˜๋„ค! ๊ณ ๋งˆ์›Œ

๋ชจ์–! ๋‚ด๊ฐ€ ๋จผ์ € ๋ฐœ๊ฒฌ ํ–ˆ๋‹ค๊ตฌ์šฐ!

Frederik1997 commented 10 months ago

E:\stable-diffusion-webui\venv\lib\site-packages\httpx_transports ๋กœ ๊ฐ€์‹œ๋ฉด default.py ์ด๋ž€ ํŒŒ์ผ์ด ์žˆ๋Š”๋ฐ ๊ทธ ํŒŒ์ด์ฌ ํŒŒ์ผ ํ…์ŠคํŠธ๋กœ ์—ฌ์‹œ๊ณ 

275๋ฒˆ์งธ ์ค„๋กœ๊ฐ€๋ฉด self._pool = httpcore.AsyncConnectionPool( ์ด๋ž€ ๋‚ด์šฉ์ด ์žˆ์Šต๋‹ˆ๋‹ค.

๊ฑฐ๊ธฐ์— ์ œ์ผ ์•„๋žซ์ค„์— ๊ฐ€๋ฉด socket_options = socket_option ์ธ๊ฐ€ ์ด๋Ÿฐ ์ค„ ์žˆ๋Š”๋ฐ ์ด ๋ถ€๋ถ„ ์ง€์šฐ์‹œ๊ณ  ์‹คํ–‰ํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค ์ „ ์ด๋ ‡๊ฒŒ ํ•ด๊ฒฐ ํ–ˆ์Šต๋‹ˆ๋‹ค.

thank you very much!!

r2k-in-the-vortex commented 10 months ago

yes, I think this fix works, who usually reviews and merges pull requests around here?

oh well, someone will get around to it I'm sure

huntchar commented 10 months ago

E:\stable-diffusion-webui\venv\lib\site-packages\httpx_transports ๋กœ์‹œ๋ฉด default.py ์ด๋ž€ ํŒŒ์ผ์ด ์—ฎ์ธ ํŒŒ์ผ ํ…์ŠคํŠธ๋กœ ์—ฌ์‹œ๊ณ 

275๋ฒˆ์งธ ์ค„๋กœ๊ฐ€๋ฉด self._pool = httpcore.AsyncConnectionPool( ์ด๋ž€ ๋‚ด์šฉ์ด ์žˆ์Šต๋‹ˆ๋‹ค.

์ €๊ธฐ์— ์ œ์ผ์ค„์— ํŽ˜์ธํŠธ ์†Œ์ผ“_options = ์†Œ์ผ“_์˜ต์…˜ ์ธ๊ฐ€ ์ด๋Ÿฐ ์ค„ ์ด ๋ถ€๋ถ„ ์ˆ˜๋ฆฌํ•˜๊ณ  ์‹คํ–‰ํ•˜๋ฉด ์ „ ์ด๋ ‡๊ฒŒ ์ฒ˜๋ฆฌํ–ˆ์Šต๋‹ˆ๋‹ค.

E:\stable-diffusion-webui\venv\lib\site-packages\httpx_transports ๋กœ์‹œ๋ฉด default.py ์ด๋ž€ ํŒŒ์ผ์ด ์—ฎ์ธ ํŒŒ์ผ ํ…์ŠคํŠธ๋กœ ์—ฌ์‹œ๊ณ 

275๋ฒˆ์งธ ์ค„๋กœ๊ฐ€๋ฉด self._pool = httpcore.AsyncConnectionPool( ์ด๋ž€ ๋‚ด์šฉ์ด ์žˆ์Šต๋‹ˆ๋‹ค.

์ €๊ธฐ์— ์ œ์ผ์ค„์— ํŽ˜์ธํŠธ ์†Œ์ผ“_options = ์†Œ์ผ“_์˜ต์…˜ ์ธ๊ฐ€ ์ด๋Ÿฐ ์ค„ ์ด ๋ถ€๋ถ„ ์ˆ˜๋ฆฌํ•˜๊ณ  ์‹คํ–‰ํ•˜๋ฉด ์ „ ์ด๋ ‡๊ฒŒ ์ฒ˜๋ฆฌํ–ˆ์Šต๋‹ˆ๋‹ค.

huntchar commented 10 months ago

์˜ˆ, ์ด ๋ถ€๋ถ„์˜ ํŠน์ง•์ด ํšจ๊ณผ๊ฐ€ ์žˆ๋‹ค๊ณ  ์ƒ๊ฐํ•ฉ๋‹ˆ๋‹ค. ์ผ๋ฐ˜์ ์œผ๋กœ ์—ฌ๊ธฐ์—์„œ ํ’€ ์š”์ฒญ์„ ๊ฒ€ํ† ํ•˜๊ณ  ์••์ถ•ํ•˜๋Š” ์‚ฌ๋žŒ์€ ๋ˆ„๊ตฌ์ž…๋‹ˆ๊นŒ?

์•„์•ผ ๋ญ, ๋ญ์•ผ?

We will find a way. we always have.

r2k-in-the-vortex commented 10 months ago

ah, change already made, get latest should be problem solved

claire2022chan commented 10 months ago

I just solved the problem with the command above. !pip install httpx==0.24.1

DuckersMcQuack commented 10 months ago
cd stable-diffusion-webui && source venv/bin/activate
pip3 install httpx==0.24.1

For future messups, one can simply just add "httpx==0.24.1" to requirements.txt, right?

roseyyy2022ai commented 10 months ago

I'm trying to run it on CPU in huggingface and got the same error but changing it in the requirements results in a build error. Version httpcore==0.24.1 is unavailable from the list of versions 0.01-1.0.2

exeshe4ki commented 10 months ago

I am not a coding guy, but i've read this thread and tried to repeat the process from @huntchar

And it helps in my case.

Open file: \stable-diffusion-webui\venv\Lib\site-packages\httpx_transports\default.py Search line 275.

Code looks like that:

self._pool = httpcore.AsyncConnectionPool(
                ssl_context=ssl_context,
                max_connections=limits.max_connections,
                max_keepalive_connections=limits.max_keepalive_connections,
                keepalive_expiry=limits.keepalive_expiry,
                http1=http1,
                http2=http2,
                uds=uds,
                local_address=local_address,
                retries=retries,
                socket_options=socket_options,

Remove last line, socket_options=socket_options, save the file. Restart SD.

Brandon4466 commented 9 months ago

For anybody that is experiencing this problem on Windows, open a CMD in your main SD web-ui folder, then run these two commands:

venv\Scripts\activate.bat
pip install httpx==0.24.1
Sieboldianus commented 9 months ago

Does not work for me:

source venv/bin/activate
pip3 install httpx==0.24.1

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'

mewlolmelo commented 9 months ago

I fixed it with

pip install -U pip
pip install -U httpcore

where am i uspposed to type this?

matiasstornini commented 9 months ago

no funciona ni una solucion, bravo, inservible

matiasstornini commented 9 months ago

la unica manera de arraglar esto es seleccionar la carpetira y SUPRIMIR; listo, se acabรณ el problema, cortar el sida este que no funciona ๐Ÿ˜Ž

djbritt commented 5 months ago
pip3 install httpx==0.24.1

This fixed sd web for me. With the issue "TypeError: AsyncConnectionPool.init() got an unexpected keyword argument 'socket_options'"

FrederikSchack commented 4 months ago

I have the same problem, tried all of the suggestions above. TypeError: AsyncConnectionPool.init() got an unexpected keyword argument 'socket_options' Press any key to continue . . .