mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 17:24:32 +02:00
fix redirector
This commit is contained in:
+1
-1
@@ -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':
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user