From 931fa8f107166a9a201501421480db3b640c291a Mon Sep 17 00:00:00 2001 From: Midcoastal Date: Thu, 7 Dec 2023 19:01:55 -0500 Subject: [PATCH] Add ENV var to dissable Gradio Frontend Check This is nessesary for large Model collections, as the initial gradio frontend health check can timeout (3 seconds) and prevent the WebUI from loading. This is optional, and does not impact the actual load/launch or other functionality. --- webui.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/webui.py b/webui.py index d352bed72..1e53b7d47 100644 --- a/webui.py +++ b/webui.py @@ -266,6 +266,8 @@ def start_ui(): favicon_path='html/logo.ico', allowed_paths=[os.path.dirname(__file__), cmd_opts.data_dir], app_kwargs=fastapi_args, + # Workaround for issues with Gradio Network check timeouts (edge-case, but no other workound) + _frontend=not os.environ.get('SD_DISABLE_GRADIO_FRONTEND_CHECK', None), ) if cmd_opts.data_dir is not None: ui_tempdir.register_tmp_file(shared.demo, os.path.join(cmd_opts.data_dir, 'x'))