AUTOMATIC1111 / stable-diffusion-webui

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

[Bug]: Gradio not allowing offline launch #11182

Closed Astra060 closed 1 year ago

Astra060 commented 1 year ago

Is there an existing issue for this?

What happened?

if I launch webui completely online it just refuses to work thanks to gradio. It does load things to the local host with default theme, but it's technically dead. doesn't generate anything, nothing. When I reconnect and reload UI it works again. I might not have internet for days, so I need to be able to launch webui fully offline.

Steps to reproduce the problem

launch normally without internet with no dependencies problems occurring

What should have happened?

Program must launch without needing internet

Commit where the problem happens

version 1.3.2

What Python version are you running on ?

Python 3.10.x

What platforms do you use to access the UI ?

Windows

What device are you running WebUI on?

Nvidia GPUs (RTX 20 above)

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

--xformers

List of extensions

a1111-sd-webui-haku-img gif2gif sd-dynamic-prompts sd-extension-sstem-info sd-pixel sd-web-ui-quickcss sd-webui-ar sd-webui-controlnet sd-webui-infinite-image-browsing sd_dreambooth_extention StylePile

Console logs

ControlNet v1.1.184
ControlNet v1.1.184
changing gradio theme: ConnectionError
Traceback (most recent call last):
  File "X:\Stable-Diffusion\webui\venv\lib\site-packages\urllib3\connection.py", line 174, in _new_conn
    conn = connection.create_connection(
  File "X:\Stable-Diffusion\webui\venv\lib\site-packages\urllib3\util\connection.py", line 72, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "C:\Users\Astra\AppData\Local\Programs\Python\Python310\lib\socket.py", line 955, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 11001] getaddrinfo failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "X:\Stable-Diffusion\webui\venv\lib\site-packages\urllib3\connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
  File "X:\Stable-Diffusion\webui\venv\lib\site-packages\urllib3\connectionpool.py", line 386, in _make_request
    self._validate_conn(conn)
  File "X:\Stable-Diffusion\webui\venv\lib\site-packages\urllib3\connectionpool.py", line 1042, in _validate_conn
    conn.connect()
  File "X:\Stable-Diffusion\webui\venv\lib\site-packages\urllib3\connection.py", line 363, in connect
    self.sock = conn = self._new_conn()
  File "X:\Stable-Diffusion\webui\venv\lib\site-packages\urllib3\connection.py", line 186, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x0000013C57D57C70>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "X:\Stable-Diffusion\webui\venv\lib\site-packages\requests\adapters.py", line 486, in send
    resp = conn.urlopen(
  File "X:\Stable-Diffusion\webui\venv\lib\site-packages\urllib3\connectionpool.py", line 787, in urlopen
    retries = retries.increment(
  File "X:\Stable-Diffusion\webui\venv\lib\site-packages\urllib3\util\retry.py", line 592, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /api/spaces/gradio/monochrome (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x0000013C57D57C70>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "X:\Stable-Diffusion\webui\modules\shared.py", line 684, in reload_gradio_theme
    gradio_theme = gr.themes.ThemeClass.from_hub(theme_name)
  File "X:\Stable-Diffusion\webui\venv\lib\site-packages\gradio\themes\base.py", line 165, in from_hub
    space_info = api.space_info(name)
  File "X:\Stable-Diffusion\webui\venv\lib\site-packages\huggingface_hub\utils\_validators.py", line 120, in _inner_fn
    return fn(*args, **kwargs)
  File "X:\Stable-Diffusion\webui\venv\lib\site-packages\huggingface_hub\hf_api.py", line 1729, in space_info
    r = get_session().get(path, headers=headers, timeout=timeout, params=params)
  File "X:\Stable-Diffusion\webui\venv\lib\site-packages\requests\sessions.py", line 602, in get
    return self.request("GET", url, **kwargs)
  File "X:\Stable-Diffusion\webui\venv\lib\site-packages\requests\sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "X:\Stable-Diffusion\webui\venv\lib\site-packages\requests\sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "X:\Stable-Diffusion\webui\venv\lib\site-packages\requests\adapters.py", line 519, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /api/spaces/gradio/monochrome (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x0000013C57D57C70>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))

add tab
CUDA SETUP: Loading binary X:\Stable-Diffusion\webui\venv\lib\site-packages\bitsandbytes\libbitsandbytes_cudaall.dll...
Running on local URL:  http://127.0.0.1:7860

Additional information

I tried version 1.2.0 ... 1.3.2 non worked. This wasn't a problem in the past

neph1 commented 1 year ago

It seems to happen when "changing gradio theme: ConnectionError" I run it offline at times without any problems, but I have never changed theme. Have you tried running with the default theme?

Astra060 commented 1 year ago

It seems to happen when "changing gradio theme: ConnectionError" I run it offline at times without any problems, but I have never changed theme. Have you tried running with the default theme?

Okay... it worked. strange enough the problem was that I changed the Theme to manage the color pallet as CSS App no longer works completely. I'll close this tomorrow for people to see and so that it may be fixed later or added as a feature? Thanks a lot