|
40 | 40 | parser.add_argument("--always-batch-cond-uncond", action='store_true', help="disables cond/uncond batching that is enabled to save memory with --medvram or --lowvram")
|
41 | 41 | parser.add_argument("--unload-gfpgan", action='store_true', help="does not do anything.")
|
42 | 42 | parser.add_argument("--precision", type=str, help="evaluate at this precision", choices=["full", "autocast"], default="autocast")
|
43 |
| -parser.add_argument("--share", action='store_true', help="use share=True for gradio and make the UI accessible through their site (doesn't work for me but you might have better luck)") |
| 43 | +parser.add_argument("--share", action='store_true', help="use share=True for gradio and make the UI accessible through their site") |
44 | 44 | parser.add_argument("--ngrok", type=str, help="ngrok authtoken, alternative to gradio --share", default=None)
|
45 | 45 | parser.add_argument("--ngrok-region", type=str, help="The region in which ngrok should start.", default="us")
|
46 | 46 | parser.add_argument("--codeformer-models-path", type=str, help="Path to directory with codeformer model file(s).", default=os.path.join(models_path, 'Codeformer'))
|
|
97 | 97 | "outdir_save",
|
98 | 98 | }
|
99 | 99 |
|
| 100 | +if cmd_opts.share or cmd_opts.listen: |
| 101 | + cmd_opts.disable_extension_access = True |
| 102 | + |
100 | 103 | devices.device, devices.device_interrogate, devices.device_gfpgan, devices.device_swinir, devices.device_esrgan, devices.device_scunet, devices.device_codeformer = \
|
101 | 104 | (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'])
|
102 | 105 |
|
|
0 commit comments