Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Error: Connection errored out. #9074

Open
1 task done
HaruomiX opened this issue Mar 28, 2023 · 64 comments
Open
1 task done

[Bug]: Error: Connection errored out. #9074

HaruomiX opened this issue Mar 28, 2023 · 64 comments
Labels
asking-for-help-with-local-system-issues This issue is asking for help related to local system; please offer assistance

Comments

@HaruomiX
Copy link

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits

What happened?

This is my first time making a report on github, so I might miss a few things here and there.

I was using it normally for the first 5 minutes, after adding a couple of models, and changed model for the first time, it stayed refreshing for 5 minutes so I decided to refresh the page and now I see errors all over the page, when I type in the input box it shows an error and I can't change models it shows error there, I tried reloading UI, reinstalling the whole git and deleting the huggingface folder from ./cache sometimes it works but after 1 minute it breaks again

image

I've tried checking the browser console all I see is 1 error and its
Firefox can’t establish a connection to the server at ws://127.0.0.1:7860/queue/join.

Steps to reproduce the problem

Unknown

What should have happened?

Should not show error messages and work normally.

Commit where the problem happens

955df77

What platforms do you use to access the UI ?

Windows

What browsers do you use to access the UI ?

Mozilla Firefox

Command Line Arguments

None

List of extensions

Default

Console logs

venv "D:\Workspace\Stable Diffusion WebUI\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)]
Commit hash: 955df7751eef11bb7697e2d77f6b8a6226b21e13
Installing requirements for Web UI
Launching Web UI with arguments:
No module 'xformers'. Proceeding without it.
Loading weights [abcaf14e5a] from D:\Workspace\Stable Diffusion WebUI\stable-diffusion-webui\models\Stable-diffusion\anything-v3-full.safetensors
Creating model from config: D:\Workspace\Stable Diffusion WebUI\stable-diffusion-webui\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 5.2s (load weights from disk: 0.5s, create model: 0.6s, apply weights to model: 0.9s, apply half(): 0.9s, move model to device: 0.9s, load textual inversion embeddings: 1.3s).
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 15.7s (import torch: 2.7s, import gradio: 2.5s, import ldm: 0.6s, other imports: 2.6s, load scripts: 1.1s, load SD checkpoint: 5.6s, create ui: 0.4s, gradio launch: 0.1s).

Additional information

No response

@HaruomiX HaruomiX added the bug-report Report of a bug, yet to be confirmed label Mar 28, 2023
@AndreyDonchev
Copy link

Same here. Happened after the last update.
Clipboard02
Clipboard01

@HaruomiX
Copy link
Author

After trying a bunch of stuff I have found out that adding the code below at the bottom of the style.css file helps a bit, but problems still occur sometimes.

[id^="setting_"] > div[style*="position: absolute"] {
	display: none !important;
}

@Oxygeniums
Copy link

I have the same error when I try to connect from another device, although everything is fine on the main computer

@tangbaiwan
Copy link

取消外网,清除代理信息就可以

@bjl101501
Copy link

I have the same error when I try to connect from another device, although everything is fine on the main computer

me too

@mik3lang3lo
Copy link

Same problem, did a fresh install, always happens when sending an image to extras and trying to scale it

@mik3lang3lo
Copy link

image

Happens with any upscaler, all the time, fresh install, any model, any VAE. Any suggestion to try?

@RchGrav
Copy link

RchGrav commented Mar 28, 2023

export COMMANDLINE_ARGS="--no-gradio-queue"

@muzipiao
Copy link

取消外网,清除代理信息就可以

可部署在服务器上,只能用外网

@ProGamerGov
Copy link
Contributor

I'm running into this issue as well

@hashnag
Copy link

hashnag commented Apr 2, 2023

export COMMANDLINE_ARGS="--no-gradio-queue"

Same issue here on Ubuntu 2204. This fixed it for me (thanks!).

@Rayregula
Copy link

Rayregula commented Apr 2, 2023

export COMMANDLINE_ARGS="--no-gradio-queue"

Been struggling with the same thing for a few days now. This does fix the ui but I require that the queue is working so hopefully we can figure out the reason it has been breaking everything :(

Has been broken in every commit I've tried since the option was added

@EricChanc
Copy link

image
How can I solve this problem?

@terrificdm
Copy link

Same issue, any way to solve this issue without flag with "--no-gradio-queue"? thanks

@Shaiktit
Copy link

Shaiktit commented Apr 4, 2023

export COMMANDLINE_ARGS="--no-gradio-queue"

sorry dumb question, how do i run this command line? do i insert in the batch file? if i run on python it tells me syntax error

@terrificdm
Copy link

Just copy and paste export COMMANDLINE_ARGS="--no-gradio-queue" in your cli tool which you use to run bash webui.sh command, then press enter. And run this before run bash webui.sh, or you can put this command line in your ~/.bashrc file

@Shaiktit
Copy link

Shaiktit commented Apr 5, 2023

Just copy and paste export COMMANDLINE_ARGS="--no-gradio-queue" in your cli tool which you use to run bash webui.sh command, then press enter. And run this before run bash webui.sh, or you can put this command line in your ~/.bashrc file

usually i just run double click the batch file on windows. i dont usually run on a cli. do i run it like this?
image
then when i run my stable diffusion like this
image

@issiah-chain
Copy link

export COMMANDLINE_ARGS="--no-gradio-queue"

this can solve the problem, while another problem emerged: when one task is processing, I cannot put a second one in task queue. After I click the "Generate" to submit second task, it will show "In queue..." forever

@foxytocin
Copy link

Remote Instance

  • After updating the new newest version (today) i get the same error using the webui on a remote instance using --listen --port 4000 --api --no-half --gradio-auth user:name --api-auth user:name --hide-ui-dir-config --cors-allow-origins=*
  • request via API just works fine even queuing

Local Instance

  • Works just fine.
  • Testes with and without different commands
    • --listen --port 4000 works (with and without)
    • --gradio-auth user:name (with and without)
    • --api --api-auth user:name (with and without)

@Rayregula
Copy link

Remote Instance

  • After updating the new newest version (today) i get the same error using the webui on a remote instance using --listen --port 4000 --api --no-half --gradio-auth user:name --api-auth user:name --hide-ui-dir-config --cors-allow-origins=*
  • request via API just works fine even queuing

Local Instance

  • Works just fine.

  • Testes with and without different commands

    • --listen --port 4000 works (with and without)
    • --gradio-auth user:name (with and without)
    • --api --api-auth user:name (with and without)

Which branch are you using? latest I see for the master branch is 2 weeks ago? 22bcc7b

@jpenalbae
Copy link

jpenalbae commented Apr 9, 2023

Using master which includes 22bcc7b does not fix the problem for me. The only workaround is using --no-gradio-queue

error

@honunu
Copy link

honunu commented Apr 11, 2023

I am running ClashX proxy, when I quit the software, the error goes away.

@Jackyboy1988
Copy link

export COMMANDLINE_ARGS="--no-gradio-queue"

worked for me. thanks!

@Doublefire-Chen
Copy link

export COMMANDLINE_ARGS="--no-gradio-queue"

Thank you, it works on my Ubuntu Server 20.04

@Rayregula
Copy link

Rayregula commented Apr 18, 2023

Can I get confirmation if any of these issues are only happening on http connections that are using --gradio-auth?
(except for @foxytocin who has already stated that they had issues either way.)

When gradio queue is enabled and tries to use websockets it attempts to access the login cookie for an https connection and fails to do so as only the one created from http exists.

Apparently a documented gradio issue. I've been trying to fix it for like two weeks. Just wish the people saying to use --no-gradio-queue would have mentioned that was the reason since I need the queue to be working.

Took me like 5 seconds to fix with an ssl cert once I knew that was the problem. I've wasted so much time thinking the queue implementation of the webui was the problem.

Anyway, that was the issue for me and I hope stating it here helps someone else.

@bjl101501
Copy link

bjl101501 commented Apr 20, 2023

如果这些问题中的任何一个只发生在使用 --gradio-auth 的 http 连接上,我能得到确认吗? (除了谁已经说过他们有问题。

当启用 gradio 队列并尝试使用 websockets 时,它会尝试访问 https 连接的登录 cookie 并失败,因为只有从 http 创建的那个存在。

显然是一个记录在案的 gradio 问题。我已经尝试修复它大约两周了。只是希望人们说使用--no-gradio-queue会提到这就是原因,因为我需要队列工作。

一旦我知道这是问题所在,我花了大约 5 秒钟来使用 ssl 证书进行修复。我浪费了很多时间认为webui的队列实现是问题所在。

无论如何,这对我来说是问题所在,我希望在这里陈述它可以帮助其他人。

Referring to gradio's bug fix, currently manually modifying the routes file can solve the problem,But there are still plug-ins that report errors
here https://github.com/gradio-app/gradio/pull/3735/files

@id88viper88id
Copy link

@GoodLandxxx

try setting arg " --no-gradio-queue"

Uncertain whether or not you replied to mentioning of this discussion by @CoqueTornado in another discussion, or to my post before it about the training result images being too colorful and not realistically-looking, I can say that I had already tried using the --no-gradio-queue argument/flag (doing so back with the previous version of Stable Diffusion itself, and the previous version of Torch as well, when the training would crash at the preparation stage, performing not any actual training at all), both running it directly in the Mac Terminal before running bash webui.sh, as well as adding it at the line with the arguments/flags in the webui-user.sh file, and it did not help with that previous issue.
I could try adding it either at the line with the arguments/flags in the webui-user.sh file, or in the .zshrc file, but I doubt it would solve the issue of the training result images being as colorful as shown in the screenshot in my previous post, and, besides that, training is yet a lengthy process (even on Apple Mac Mini M2 Pro), so I could write back about the results of using the --no-gradio-queue argument/flag only some time later

P.S. I can see that the latest version of Stable Diffusion mentioned under Releases as of now is 1.2.1, so I will also update my installation of Stable Diffusion to that particular version, and check how training in that version will work with the --no-gradio-queue argument/flag

@congaterori
Copy link

IT said launch.py: error: unrecognized arguments: --no-gradio-queue
i run by google colab automatic111 (anythingv4.5), i can't run it recently

Failed to build pycairo

stderr:   error: subprocess-exited-with-error
  
  × Building wheel for pycairo (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pycairo
ERROR: Could not build wheels for pycairo, which is required to install pyproject.toml-based projects


Warning: Failed to install svglib, some preprocessors may not work.
Installing sd-webui-controlnet requirement: fvcore

Launching Web UI with arguments: --share --disable-safe-unpickle --no-half-vae --xformers --enable-insecure-extension --no-gradio-queue --theme dark --remotemoe
usage: launch.py
       [-h]
       [--data-dir DATA_DIR]
       [--config CONFIG]
       [--ckpt CKPT]
       [--ckpt-dir CKPT_DIR]
       [--vae-dir VAE_DIR]
       [--gfpgan-dir GFPGAN_DIR]
       [--gfpgan-model GFPGAN_MODEL]
       [--no-half]
       [--no-half-vae]
       [--no-progressbar-hiding]
       [--max-batch-count MAX_BATCH_COUNT]
       [--embeddings-dir EMBEDDINGS_DIR]
       [--textual-inversion-templates-dir TEXTUAL_INVERSION_TEMPLATES_DIR]
       [--hypernetwork-dir HYPERNETWORK_DIR]
       [--localizations-dir LOCALIZATIONS_DIR]
       [--allow-code]
       [--medvram]
       [--lowvram]
       [--lowram]
       [--always-batch-cond-uncond]
       [--unload-gfpgan]
       [--precision {full,autocast}]
       [--upcast-sampling]
       [--share]
       [--ngrok NGROK]
       [--ngrok-region NGROK_REGION]
       [--enable-insecure-extension-access]
       [--codeformer-models-path CODEFORMER_MODELS_PATH]
       [--gfpgan-models-path GFPGAN_MODELS_PATH]
       [--esrgan-models-path ESRGAN_MODELS_PATH]
       [--bsrgan-models-path BSRGAN_MODELS_PATH]
       [--realesrgan-models-path REALESRGAN_MODELS_PATH]
       [--clip-models-path CLIP_MODELS_PATH]
       [--xformers]
       [--force-enable-xformers]
       [--xformers-flash-attention]
       [--deepdanbooru]
       [--opt-split-attention]
       [--opt-sub-quad-attention]
       [--sub-quad-q-chunk-size SUB_QUAD_Q_CHUNK_SIZE]
       [--sub-quad-kv-chunk-size SUB_QUAD_KV_CHUNK_SIZE]
       [--sub-quad-chunk-threshold SUB_QUAD_CHUNK_THRESHOLD]
       [--opt-split-attention-invokeai]
       [--opt-split-attention-v1]
       [--disable-opt-split-attention]
       [--disable-nan-check]
       [--use-cpu USE_CPU [USE_CPU ...]]
       [--listen]
       [--port PORT]
       [--show-negative-prompt]
       [--ui-config-file UI_CONFIG_FILE]
       [--hide-ui-dir-config]
       [--freeze-settings]
       [--ui-settings-file UI_SETTINGS_FILE]
       [--gradio-debug]
       [--gradio-auth GRADIO_AUTH]
       [--gradio-auth-path GRADIO_AUTH_PATH]
       [--gradio-img2img-tool GRADIO_IMG2IMG_TOOL]
       [--gradio-inpaint-tool GRADIO_INPAINT_TOOL]
       [--opt-channelslast]
       [--styles-file STYLES_FILE]
       [--autolaunch]
       [--theme THEME]
       [--use-textbox-seed]
       [--disable-console-progressbars]
       [--enable-console-prompts]
       [--vae-path VAE_PATH]
       [--disable-safe-unpickle]
       [--api]
       [--api-auth API_AUTH]
       [--api-log]
       [--nowebui]
       [--ui-debug-mode]
       [--device-id DEVICE_ID]
       [--administrator]
       [--cors-allow-origins CORS_ALLOW_ORIGINS]
       [--cors-allow-origins-regex CORS_ALLOW_ORIGINS_REGEX]
       [--tls-keyfile TLS_KEYFILE]
       [--tls-certfile TLS_CERTFILE]
       [--server-name SERVER_NAME]
       [--gradio-queue]
       [--skip-version-check]
       [--no-hashing]
       [--no-download-sd-model]
       [--controlnet-dir CONTROLNET_DIR]
       [--controlnet-annotator-models-path CONTROLNET_ANNOTATOR_MODELS_PATH]
       [--no-half-controlnet]
       [--controlnet-preprocessor-cache-size CONTROLNET_PREPROCESSOR_CACHE_SIZE]
       [--cloudflared]
       [--localhostrun]
       [--remotemoe]
       [--ldsr-models-path LDSR_MODELS_PATH]
       [--lora-dir LORA_DIR]
       [--scunet-models-path SCUNET_MODELS_PATH]
       [--swinir-models-path SWINIR_MODELS_PATH]
launch.py: error: unrecognized arguments: --no-gradio-queue

@GounGG
Copy link

GounGG commented May 25, 2023

Similarly, in version 1.2.1, --no-gradio-queue cannot be used. The worst impact is that when running the UI in kubernetes, the web socket is very unstable and often fails. I guess it is because of the proxy.

│                                                                              │
│   418 │   if cmd_opts.nowebui:                                               │
│   419 │   │   api_only()                                                     │
│   420 │   else:                                                              │
│ ❱ 421 │   │   webui()                                                        │
│   422                                                                        │
│                                                                              │
│ /content/stable-diffusion-webui/webui.py:319 in webui                        │
│                                                                              │
│   316 │   │   │   FastAPI.original_setup = FastAPI.setup                     │
│   317 │   │   │   FastAPI.setup = fastapi_setup                              │
│   318 │   │                                                                  │
│ ❱ 319 │   │   app, local_url, share_url = shared.demo.launch(                │
│   320 │   │   │   share=cmd_opts.share,                                      │
│   321 │   │   │   server_name=server_name,                                   │
│   322 │   │   │   server_port=cmd_opts.port,                                 │
│                                                                              │
│ /home/user/.local/lib/python3.10/site-packages/gradio/blocks.py:1717 in      │
│ launch                                                                       │
│                                                                              │
│   1714 │   │   if not isinstance(self.blocked_paths, list):                  │
│   1715 │   │   │   raise ValueError("`blocked_paths` must be a list of direc │
│   1716 │   │                                                                 │
│ ❱ 1717 │   │   self.validate_queue_settings()                                │
│   1718 │   │                                                                 │
│   1719 │   │   self.config = self.get_config_file()                          │
│   1720 │   │   self.max_threads = max(                                       │
│                                                                              │
│ /home/user/.local/lib/python3.10/site-packages/gradio/blocks.py:1556 in      │
│ validate_queue_settings                                                      │
│                                                                              │
│   1553 │                                                                     │
│   1554 │   def validate_queue_settings(self):                                │
│   1555 │   │   if not self.enable_queue and self.progress_tracking:          │
│ ❱ 1556 │   │   │   raise ValueError("Progress tracking requires queuing to b │
│   1557 │   │                                                                 │
│   1558 │   │   for fn_index, dep in enumerate(self.dependencies):            │
│   1559 │   │   │   if not self.enable_queue and self.queue_enabled_for_fn(fn │
╰──────────────────────────────────────────────────────────────────────────────╯
ValueError: Progress tracking requires queuing to be enabled.

start flag

python webui.py --xformers --listen --enable-insecure-extension-access --no-progressbar-hiding  --no-gradio-queue

Now I have to use an old version because it depends on a lower version of gradio as well.

@id88viper88id
Copy link

In my case (Stable Diffusion run locally on my Mac Mini), using --no-gradio-queue made no difference whatsoever, and for that reason I simply removed it from the export COMMANDLINE_ARGS= line in the webui-user.sh file.
Speaking of the training test images, and then the resulting images generated after the training has already finished, being excessively vividly colored and the subjects illustrated in them visually disfigured, I have managed to find out that it was due to overtraining of the model through too many steps performed. The default value for the steps under the Train tab is 100K (i.e. one hundred thousand), which turns out to be way too much, and, as a result of that, Stable Diffusion deviates from the dataset images too much, adding too much noise, and thus making the resulting images look grotesque, and not like, say, realistic photos.
When I decreased the number of steps down to 2000 (which is recommended at some websites to experiment at around that value), many of the resulting images did begin to look more like realistic photos - some of them did indeed look like realistic photos, while other were not exactly so, but close to that.
As it thus turned out, then, the default value of 100K steps is way too high if you want to generate images that look like realistic photos, or at least images that do not look grotesque due to overcoloring and unnatural, visual disfigurations of the subjects that they illustrate

@NureddinFarzaliyev
Copy link

I'm using Stable Diffusion in Google Colab via saving my files on Google Drive and facing the same issue.

First, i've downloaded user-webui.bat file, added set COMMANDLINE_ARGS="--no-gradio-queue" line and replaced the file in google drive with the edited file. Then, i've realised that when i run Install/Update AUTOMATIC1111 repo, it changes the file to its original. So, i've tried to run Install/Update AUTOMATIC1111 repo then change the bat file. But issue keeps ocurring.

@NureddinFarzaliyev
Copy link

Now I have to use an old version because it depends on a lower version of gradio as well.

@GounGG Which version can be used to avoid connection errored out issue? Is it possible to use older versions in google colab?

@akx akx added platform:mac Issues that apply to Apple OS X, M1, M2, etc and removed platform:mac Issues that apply to Apple OS X, M1, M2, etc labels Jun 13, 2023
@akx akx added the platform:mac Issues that apply to Apple OS X, M1, M2, etc label Jul 26, 2023
@Moryanmeena
Copy link

export COMMANDLINE_ARGS="--no-gradio-queue"

i am also having same issue but i use stable diffusion on google colab. can someone help me on it?

@congaterori
Copy link

congaterori commented Aug 15, 2023

export COMMANDLINE_ARGS="--no-gradio-queue"

i am also having same issue but i use stable diffusion on google colab. can someone help me on it?

i used !COMMANDLINE_ARGS="--disable-safe-unpickle --no-half-vae --share --xformers --enable-insecure-extension --gradio-queue --cloudflared --theme dark" REQS_FILE="requirements.txt" python launch.py
but it doesn't work so i changed into !COMMANDLINE_ARGS="--share --disable-safe-unpickle --no-half-vae --xformers --enable-insecure-extension --gradio-queue --theme dark" REQS_FILE="requirements.txt" python launch.py
i am using counterfeit v2.5 on google colab Pay As You Go $9.99

also i put this in the console of google colab web so it can remain use while run

function ClickConnect() {
    console.log("Working");
    document.querySelector("#top-toolbar > colab-connect-button").shadowRoot.querySelector("#connect").click();
}
setInterval(ClickConnect, 60000);

@Moryanmeena
Copy link

export COMMANDLINE_ARGS="--no-gradio-queue"

i am also having same issue but i use stable diffusion on google colab. can someone help me on it?

i used !COMMANDLINE_ARGS="--disable-safe-unpickle --no-half-vae --share --xformers --enable-insecure-extension --gradio-queue --cloudflared --theme dark" REQS_FILE="requirements.txt" python launch.py but it doesn't work so i changed into !COMMANDLINE_ARGS="--share --disable-safe-unpickle --no-half-vae --xformers --enable-insecure-extension --gradio-queue --theme dark" REQS_FILE="requirements.txt" python launch.py i am using counterfeit v2.5 on google colab Pay As You Go $9.99

also i put this in the console of google colab web so it can remain use while run

function ClickConnect() {
    console.log("Working");
    document.querySelector("#top-toolbar > colab-connect-button").shadowRoot.querySelector("#connect").click();
}
setInterval(ClickConnect, 60000);

i dont know much can you tell where i have to put !COMMANDLINE_ARGS="--share --disable-safe-unpickle --no-half-vae --xformers --enable-insecure-extension --gradio-queue --theme dark" REQS_FILE="requirements.txt" python launch.py

@Moryanmeena
Copy link

pasting this in new cell says "python3: can't open file '/content/launch.py': [Errno 2] No such file or directory"

@catboxanon catboxanon added asking-for-help-with-local-system-issues This issue is asking for help related to local system; please offer assistance and removed bug-report Report of a bug, yet to be confirmed platform:mac Issues that apply to Apple OS X, M1, M2, etc labels Aug 26, 2023
@top5list
Copy link

top5list commented Sep 7, 2023

In my case, this error occurred because of the anti-virus application kaspersky premium. It blocked the connection of Public My WebUI 127.0.0.1:7860. The solution is to add 127.0.0.1:7860 to Kaspersky Premium's trusted address.

@KarinMiku
Copy link

In my case, this error occurred because of the anti-virus application kaspersky premium. It blocked the connection of Public My WebUI 127.0.0.1:7860. The solution is to add 127.0.0.1:7860 to Kaspersky Premium's trusted address.

oh kaspersky, always doing weird things.. thank u so much! your solution was what i needed, this antivirus seem to mess with most of the AI programs xD (had an issue like this with Okada's voice changer)

@VrchDeveloper
Copy link

I got it fixed by NOT adding --no-gradio-queue option, instead updating Nginx proxy settings as follows:

proxy_set_header    Upgrade     $http_upgrade;
proxy_set_header    Connection  "upgrade";

References

@XTRMsavage
Copy link

Just copy and paste export COMMANDLINE_ARGS="--no-gradio-queue" in your cli tool which you use to run bash webui.sh command, then press enter. And run this before run bash webui.sh, or you can put this command line in your ~/.bashrc file

I am just running Automatic1111 by 2x Clicking "webui-user.bat" file. How do I add this command line? I am not coding savvy :(

@BrassaiKao
Copy link

BrassaiKao commented Dec 8, 2023

I have same issue when i use ngnix for proxy.
And solved by setting proxy parameters that reference by Gradio's guide.
By the way, this is not bug. It's he relationship of how Gradio Queue works.

Gradio's Guide
running-gradio-on-your-web-server-with-nginx

Nginx Proxy Paramters

server {
listen 80;
server_name example.com www.example.com;
location /gradio-demo/ {
proxy_pass http://127.0.0.1:7860/;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;

}
}

@Nara915
Copy link

Nara915 commented Dec 13, 2023

export COMMANDLINE_ARGS="--no-gradio-queue"
worked for me. TOO thanks!

@XQXE
Copy link

XQXE commented Dec 21, 2023

取消外网,清除代理信息就可以

可部署在服务器上,只能用外网

哥们 你解决了吗

@valterm
Copy link

valterm commented Feb 14, 2024

The webui was unusable while using an nginx reverse proxy to access my install remotely. Each connection got an "Connection errored out" warning, and I couldn't generate any images.

Can confirm that --no-gradio-queue fixed the issue.

@scrypt-kitty
Copy link

Just copy and paste export COMMANDLINE_ARGS="--no-gradio-queue" in your cli tool which you use to run bash webui.sh command, then press enter. And run this before run bash webui.sh, or you can put this command line in your ~/.bashrc file

usually i just run double click the batch file on windows. i dont usually run on a cli. do i run it like this? image then when i run my stable diffusion like this image

Just copy and paste export COMMANDLINE_ARGS="--no-gradio-queue" in your cli tool which you use to run bash webui.sh command, then press enter. And run this before run bash webui.sh, or you can put this command line in your ~/.bashrc file

I am just running Automatic1111 by 2x Clicking "webui-user.bat" file. How do I add this command line? I am not coding savvy :(

Open webui-user.bat and add set COMMANDLINE_ARGS=--no-gradio-queue

It still took a couple hundred seconds but I was able to run on the latest repo clone.

@Sadamingh
Copy link

Sadamingh commented May 30, 2024

When running webui.sh, add the argument --no-gradio-queue can also fix this issue. However, this is not the preferred way since the gradio queue has been disabled.

$ ./webui.sh --listen --no-gradio-queue

Actually, @BrassaiKao 's solution provides the insights. By adding only these two headers in the nginx conf fixed the problem.

...
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
...

Should add it to the error message to help with resolving this issue.

@ipaqmaster
Copy link

ipaqmaster commented Jun 6, 2024

proxy_set_header    Upgrade     $http_upgrade;
proxy_set_header    Connection  "upgrade";

References

Websocket Connection Failed Through Nginx Proxy

Thanks this did the trick for me too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
asking-for-help-with-local-system-issues This issue is asking for help related to local system; please offer assistance
Projects
None yet
Development

No branches or pull requests