AUTOMATIC1111 / stable-diffusion-webui

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

[Bug]: TimeoutError: timed out #8418

Open Thecubezarmy opened 1 year ago

Thecubezarmy commented 1 year ago

Is there an existing issue for this?

What happened?

Did the simple installation for windows and ran webui-user.bat

Steps to reproduce the problem

  1. Go to .... webui-user.bat
  2. Press .... webui-user.bat
  3. ... get the error below, when trying to connect to http://127.0.0.1:7860/ page does not load

What should have happened?

the page should have loaded and i should have been able to use the ui

Commit where the problem happens

### What platforms do you use to access the UI ? Windows ### What browsers do you use to access the UI ? Google Chrome ### Command Line Arguments ```Shell --medvram ``` ### List of extensions no ### Console logs ```Shell venv "D:\ill\stable-diffusion-webui-master\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)] Commit hash: Installing requirements for Web UI Launching Web UI with arguments: --medvram No module 'xformers'. Proceeding without it. Downloading: "https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.safetensors" to D:\ill\stable-diffusion-webui-master\models\Stable-diffusion\v1-5-pruned-emaonly.safetensors 100%|█████████████████████████████████████████████████████████████████████████████| 3.97G/3.97G [25:15<00:00, 2.81MB/s] Calculating sha256 for D:\ill\stable-diffusion-webui-master\models\Stable-diffusion\v1-5-pruned-emaonly.safetensors: 6ce0161689b3853acaa03779ec93eafe75a02f4ced659bee03f50797806fa2fa Loading weights [6ce0161689] from D:\ill\stable-diffusion-webui-master\models\Stable-diffusion\v1-5-pruned-emaonly.safetensors Creating model from config: D:\ill\stable-diffusion-webui-master\configs\v1-inference.yaml LatentDiffusion: Running in eps-prediction mode DiffusionWrapper has 859.52 M params. Applying cross attention optimization (Doggettx). Textual inversion embeddings loaded(0): Model loaded in 851.8s (calculate hash: 57.4s, load weights from disk: 9.3s, load config: 0.1s, create model: 12.3s, apply weights to model: 514.3s, apply half(): 239.7s, apply dtype to VAE: 1.3s, load VAE: 5.0s, move model to device: 0.6s, hijack: 3.7s, load textual inversion embeddings: 7.5s, scripts callbacks: 0.5s). Traceback (most recent call last): File "D:\ill\stable-diffusion-webui-master\venv\lib\site-packages\urllib3\connectionpool.py", line 449, in _make_request six.raise_from(e, None) File "", line 3, in raise_from File "D:\ill\stable-diffusion-webui-master\venv\lib\site-packages\urllib3\connectionpool.py", line 444, in _make_request httplib_response = conn.getresponse() File "C:\Users\LuCa\AppData\Local\Programs\Python\Python310\lib\http\client.py", line 1374, in getresponse response.begin() File "C:\Users\LuCa\AppData\Local\Programs\Python\Python310\lib\http\client.py", line 318, in begin version, status, reason = self._read_status() File "C:\Users\LuCa\AppData\Local\Programs\Python\Python310\lib\http\client.py", line 279, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") File "C:\Users\LuCa\AppData\Local\Programs\Python\Python310\lib\socket.py", line 705, in readinto return self._sock.recv_into(b) TimeoutError: timed out During handling of the above exception, another exception occurred: Traceback (most recent call last): File "D:\ill\stable-diffusion-webui-master\venv\lib\site-packages\requests\adapters.py", line 439, in send resp = conn.urlopen( File "D:\ill\stable-diffusion-webui-master\venv\lib\site-packages\urllib3\connectionpool.py", line 787, in urlopen retries = retries.increment( File "D:\ill\stable-diffusion-webui-master\venv\lib\site-packages\urllib3\util\retry.py", line 550, in increment raise six.reraise(type(error), error, _stacktrace) File "D:\ill\stable-diffusion-webui-master\venv\lib\site-packages\urllib3\packages\six.py", line 770, in reraise raise value File "D:\ill\stable-diffusion-webui-master\venv\lib\site-packages\urllib3\connectionpool.py", line 703, in urlopen httplib_response = self._make_request( File "D:\ill\stable-diffusion-webui-master\venv\lib\site-packages\urllib3\connectionpool.py", line 451, in _make_request self._raise_timeout(err=e, url=url, timeout_value=read_timeout) File "D:\ill\stable-diffusion-webui-master\venv\lib\site-packages\urllib3\connectionpool.py", line 340, in _raise_timeout raise ReadTimeoutError( urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host='127.0.0.1', port=7860): Read timed out. (read timeout=3) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "D:\ill\stable-diffusion-webui-master\launch.py", line 361, in start() File "D:\ill\stable-diffusion-webui-master\launch.py", line 356, in start webui.webui() File "D:\ill\stable-diffusion-webui-master\webui.py", line 218, in webui app, local_url, share_url = shared.demo.launch( File "D:\ill\stable-diffusion-webui-master\venv\lib\site-packages\gradio\blocks.py", line 1417, in launch if _frontend and (not networking.url_ok(self.local_url)) and (not self.share): File "D:\ill\stable-diffusion-webui-master\venv\lib\site-packages\gradio\networking.py", line 179, in url_ok r = requests.head(url, timeout=3, verify=False) File "D:\ill\stable-diffusion-webui-master\venv\lib\site-packages\requests\api.py", line 104, in head return request('head', url, **kwargs) File "D:\ill\stable-diffusion-webui-master\venv\lib\site-packages\requests\api.py", line 61, in request return session.request(method=method, url=url, **kwargs) File "D:\ill\stable-diffusion-webui-master\venv\lib\site-packages\requests\sessions.py", line 542, in request resp = self.send(prep, **send_kwargs) File "D:\ill\stable-diffusion-webui-master\venv\lib\site-packages\requests\sessions.py", line 655, in send r = adapter.send(request, **kwargs) File "D:\ill\stable-diffusion-webui-master\venv\lib\site-packages\requests\adapters.py", line 529, in send raise ReadTimeout(e, request=request) requests.exceptions.ReadTimeout: HTTPConnectionPool(host='127.0.0.1', port=7860): Read timed out. (read timeout=3) ``` ### Additional information _No response_
space-nuko commented 1 year ago

Do you happen to have a lot of additional networks installed? (loras, embeddings, etc.) I'm wondering if it has to do with the amount of extra networks processing happening on startup

exodia52 commented 1 year ago

Just want to add some note, i also receive the same issue when trying to launch the webui.bat after the latest commit. Tried remove Extension didn't do anything. But if i remove my Lora directory folder to default. It launch like usual.

Tried removing Ckpt dir but didn't effect it. Still slow launch. and Same Timeout Error.

Maybe it because of having too much Lora's ?

space-nuko commented 1 year ago

Think I figured it out - the Gradio crash is their problem, because that url_ok method is supposed to check for network connectivity and return true or false, not throw an exception (gradio-app/gradio#3517)

On the other hand, the reason why the webui backend takes so long to respond for me is indeed the extra networks UI, I filed an issue here to track that: #8781

StellaTrace commented 4 months ago

uhh... In my case, it was problem with windows time service. I looked windows event log and found it. so, perhaps this issue comes from automatic windows time sync. do not delete all of your lora, checkpoints, and other stuff. just simple problem.