|
44 | 44 | parser.add_argument("--share", action='store_true', help="use share=True for gradio and make the UI accessible through their site")
|
45 | 45 | parser.add_argument("--ngrok", type=str, help="ngrok authtoken, alternative to gradio --share", default=None)
|
46 | 46 | parser.add_argument("--ngrok-region", type=str, help="The region in which ngrok should start.", default="us")
|
| 47 | +parser.add_argument("--enable-insecure-extension-access", action='store_true', help="enable extensions tab regardless of other options") |
47 | 48 | parser.add_argument("--codeformer-models-path", type=str, help="Path to directory with codeformer model file(s).", default=os.path.join(models_path, 'Codeformer'))
|
48 | 49 | parser.add_argument("--gfpgan-models-path", type=str, help="Path to directory with GFPGAN model file(s).", default=os.path.join(models_path, 'GFPGAN'))
|
49 | 50 | parser.add_argument("--esrgan-models-path", type=str, help="Path to directory with ESRGAN model file(s).", default=os.path.join(models_path, 'ESRGAN'))
|
|
99 | 100 | "outdir_save",
|
100 | 101 | }
|
101 | 102 |
|
102 |
| -cmd_opts.disable_extension_access = cmd_opts.share or cmd_opts.listen |
| 103 | +cmd_opts.disable_extension_access = (cmd_opts.share or cmd_opts.listen) and not cmd_opts.enable_insecure_extension_access |
103 | 104 |
|
104 | 105 | devices.device, devices.device_interrogate, devices.device_gfpgan, devices.device_swinir, devices.device_esrgan, devices.device_scunet, devices.device_codeformer = \
|
105 | 106 | (devices.cpu if any(y in cmd_opts.use_cpu for y in [x, 'all']) else devices.get_optimal_device() for x in ['sd', 'interrogate', 'gfpgan', 'swinir', 'esrgan', 'scunet', 'codeformer'])
|
|
0 commit comments