Merge pull request #3493 from brknsoul/dev

Adding Autolaunch option
This commit is contained in:
Vladimir Mandic
2024-10-18 07:40:58 -04:00
committed by GitHub
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -426,6 +426,7 @@ startup_offload_mode, startup_cross_attention, startup_sdp_options = get_default
options_templates.update(options_section(('sd', "Execution & Models"), {
"sd_backend": OptionInfo(default_backend, "Execution backend", gr.Radio, {"choices": ["diffusers", "original"] }),
"autolaunch": OptionInfo(False, "Autolaunch browser upon startup"),
"sd_model_checkpoint": OptionInfo(default_checkpoint, "Base model", gr.Dropdown, lambda: {"choices": list_checkpoint_tiles()}, refresh=refresh_checkpoints),
"sd_model_refiner": OptionInfo('None', "Refiner model", gr.Dropdown, lambda: {"choices": ['None'] + list_checkpoint_tiles()}, refresh=refresh_checkpoints),
"sd_vae": OptionInfo("Automatic", "VAE model", gr.Dropdown, lambda: {"choices": shared_items.sd_vae_items()}, refresh=shared_items.refresh_vae_list),
+1 -1
View File
@@ -350,7 +350,7 @@ def webui(restart=False):
continue
logger.handlers = log.handlers
# autolaunch only on initial start
if cmd_opts.autolaunch and local_url is not None:
if (shared.opts.autolaunch or cmd_opts.autolaunch) and local_url is not None:
cmd_opts.autolaunch = False
shared.log.info('Launching browser')
import webbrowser