From 0acc7d3b8640b0fe57e14f9a23929376f625c896 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Wed, 24 May 2023 08:49:33 -0400 Subject: [PATCH] fix redirector --- modules/devices.py | 2 +- webui.py | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/modules/devices.py b/modules/devices.py index de806dcb1..84e6da95a 100644 --- a/modules/devices.py +++ b/modules/devices.py @@ -114,7 +114,7 @@ def set_cuda_params(): pass global dtype, dtype_vae, dtype_unet, unet_needs_upcast # pylint: disable=global-statement ok = test_fp16() - if shared.cmd_opts.use_directml: # TODO + if shared.cmd_opts.use_directml: # TODO DirectML does not have full autocast capabilities shared.opts.no_half = True shared.opts.no_half_vae = True if ok and shared.opts.cuda_dtype == 'FP32': diff --git a/webui.py b/webui.py index 3f74568d1..67d2846a0 100644 --- a/webui.py +++ b/webui.py @@ -265,10 +265,8 @@ def start_ui(): setup_middleware(app, cmd_opts) if cmd_opts.subpath: - redirector = FastAPI() - redirector.get("/") - _mounted_app = gradio.mount_gradio_app(redirector, shared.demo, path=f"/{cmd_opts.subpath}") - shared.log.info('Redirector mounted: /{cmd_opts.subpath}') + _mounted_app = gradio.mount_gradio_app(app, shared.demo, path=f"/{cmd_opts.subpath}") + shared.log.info(f'Redirector mounted: /{cmd_opts.subpath}') cmd_opts.autolaunch = False startup_timer.record("launch")