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.
This commit is contained in:
Midcoastal
2023-12-07 19:01:55 -05:00
parent bd64bac2a3
commit 931fa8f107
+2
View File
@@ -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'))