fix redirector

This commit is contained in:
Vladimir Mandic
2023-05-24 08:49:33 -04:00
parent 531544e069
commit 0acc7d3b86
2 changed files with 3 additions and 5 deletions
+1 -1
View File
@@ -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':
+2 -4
View File
@@ -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")