"extra_options":shared.OptionInfo([],"Options in main UI",ui_components.DropdownMulti,lambda:{"choices":list(shared.opts.data_labels.keys())}).js("info","settingsHintsShowQuicksettings").info("setting entries that also appear in txt2img/img2img interfaces").needs_reload_ui(),
"extra_options":shared.OptionInfo([],"Options in main UI",ui_components.DropdownMulti,lambda:{"choices":list(shared.opts.data_labels.keys())}).js("info","settingsHintsShowQuicksettings").info("setting entries that also appear in txt2img/img2img interfaces").needs_reload_ui(),
"extra_options_accordion":shared.OptionInfo(False,"Place options in main UI into an accordion").needs_restart()
"extra_options_cols":shared.OptionInfo(1,"Options in main UI - number of columns",gr.Number,{"precision":0}).needs_reload_ui(),
"extra_options_accordion":shared.OptionInfo(False,"Options in main UI - place into an accordion").needs_reload_ui()
run(f'"{git}" -C "{dir}" fetch',f"Fetching updates for {name}...",f"Couldn't fetch {name}")
run_git('fetch',f"Fetching updates for {name}...",f"Couldn't fetch {name}")
run(f'"{git}" -C "{dir}" checkout {commithash}',f"Checking out commit for {name} with hash: {commithash}...",f"Couldn't checkout commit {commithash} for {name}",live=True)
run_git('checkout',f"Checking out commit for {name} with hash: {commithash}...",f"Couldn't checkout commit {commithash} for {name}",live=True)
return
return
run(f'"{git}" clone "{url}" "{dir}"',f"Cloning {name} into {dir}...",f"Couldn't clone {name}",live=True)
run(f'"{git}" clone "{url}" "{dir}"',f"Cloning {name} into {dir}...",f"Couldn't clone {name}",live=True)
assertnotis_edit_modelorall(len(conds)==1forcondsinconds_list),"AND is not supported for InstructPix2Pix checkpoint (unless using Image CFG scale = 1.0)"
"auto_launch_browser":OptionInfo("Local","Automatically open webui in browser on startup",gr.Radio,lambda:{"choices":["Disable","Local","Remote"]}),
"show_warnings":OptionInfo(False,"Show warnings in console.").needs_reload_ui(),
"show_warnings":OptionInfo(False,"Show warnings in console.").needs_reload_ui(),
"show_gradio_deprecation_warnings":OptionInfo(True,"Show gradio deprecation warnings in console.").needs_reload_ui(),
"show_gradio_deprecation_warnings":OptionInfo(True,"Show gradio deprecation warnings in console.").needs_reload_ui(),
"memmon_poll_rate":OptionInfo(8,"VRAM usage polls per second during generation.",gr.Slider,{"minimum":0,"maximum":40,"step":1}).info("0 = disable"),
"memmon_poll_rate":OptionInfo(8,"VRAM usage polls per second during generation.",gr.Slider,{"minimum":0,"maximum":40,"step":1}).info("0 = disable"),
...
@@ -481,7 +482,7 @@ For img2img, VAE is used to process user's input image before the sampling, and
...
@@ -481,7 +482,7 @@ For img2img, VAE is used to process user's input image before the sampling, and
"""),
"""),
"sd_vae_checkpoint_cache":OptionInfo(0,"VAE Checkpoints to cache in RAM",gr.Slider,{"minimum":0,"maximum":10,"step":1}),
"sd_vae_checkpoint_cache":OptionInfo(0,"VAE Checkpoints to cache in RAM",gr.Slider,{"minimum":0,"maximum":10,"step":1}),
"sd_vae":OptionInfo("Automatic","SD VAE",gr.Dropdown,lambda:{"choices":shared_items.sd_vae_items()},refresh=shared_items.refresh_vae_list).info("choose VAE model: Automatic = use one with same filename as checkpoint; None = use VAE from checkpoint"),
"sd_vae":OptionInfo("Automatic","SD VAE",gr.Dropdown,lambda:{"choices":shared_items.sd_vae_items()},refresh=shared_items.refresh_vae_list).info("choose VAE model: Automatic = use one with same filename as checkpoint; None = use VAE from checkpoint"),
"sd_vae_as_default":OptionInfo(True,"Ignore selected VAE for stable diffusion checkpoints that have their own .vae.pt next to them"),
"sd_vae_overrides_per_model_preferences":OptionInfo(True,"Selected VAE overrides per-model preferences").info("you can set per-model VAE either by editing user metadata for checkpoints, or by making the VAE have same name as checkpoint"),
"auto_vae_precision":OptionInfo(True,"Automaticlly revert VAE to 32-bit floats").info("triggers when a tensor with NaNs is produced in VAE; disabling the option in this case will result in a black square image"),
"auto_vae_precision":OptionInfo(True,"Automaticlly revert VAE to 32-bit floats").info("triggers when a tensor with NaNs is produced in VAE; disabling the option in this case will result in a black square image"),
"sd_vae_encode_method":OptionInfo("Full","VAE type for encode",gr.Radio,{"choices":["Full","TAESD"]}).info("method to encode image to latent (use in img2img, hires-fix or inpaint mask)"),
"sd_vae_encode_method":OptionInfo("Full","VAE type for encode",gr.Radio,{"choices":["Full","TAESD"]}).info("method to encode image to latent (use in img2img, hires-fix or inpaint mask)"),
"sd_vae_decode_method":OptionInfo("Full","VAE type for decode",gr.Radio,{"choices":["Full","TAESD"]}).info("method to decode latent to image"),
"sd_vae_decode_method":OptionInfo("Full","VAE type for decode",gr.Radio,{"choices":["Full","TAESD"]}).info("method to decode latent to image"),
"eta_ddim":OptionInfo(0.0,"Eta for DDIM",gr.Slider,{"minimum":0.0,"maximum":1.0,"step":0.01}).info("noise multiplier; higher = more unperdictable results"),
"eta_ddim":OptionInfo(0.0,"Eta for DDIM",gr.Slider,{"minimum":0.0,"maximum":1.0,"step":0.01}).info("noise multiplier; higher = more unperdictable results"),
"eta_ancestral":OptionInfo(1.0,"Eta for ancestral samplers",gr.Slider,{"minimum":0.0,"maximum":1.0,"step":0.01}).info("noise multiplier; applies to Euler a and other samplers that have a in them"),
"eta_ancestral":OptionInfo(1.0,"Eta for ancestral samplers",gr.Slider,{"minimum":0.0,"maximum":1.0,"step":0.01}).info("noise multiplier; applies to Euler a and other samplers that have a in them"),
"ddim_discretize":OptionInfo('uniform',"img2img DDIM discretize",gr.Radio,{"choices":['uniform','quad']}),
"ddim_discretize":OptionInfo('uniform',"img2img DDIM discretize",gr.Radio,{"choices":['uniform','quad']}),
's_churn':OptionInfo(0.0,"sigma churn",gr.Slider,{"minimum":0.0,"maximum":100.0,"step":0.01}).info('amount of stochasticity; only applies to Euler, Heun, and DPM2'),
's_tmin':OptionInfo(0.0,"sigma tmin",gr.Slider,{"minimum":0.0,"maximum":10.0,"step":0.01}).info('enable stochasticity; start value of the sigma range; only applies to Euler, Heun, and DPM2'),
's_tmax':OptionInfo(0.0,"sigma tmax",gr.Slider,{"minimum":0.0,"maximum":999.0,"step":0.01}).info("0 = inf; end value of the sigma range; only applies to Euler, Heun, and DPM2"),
's_noise':OptionInfo(1.0,"sigma noise",gr.Slider,{"minimum":0.0,"maximum":1.1,"step":0.001}).info('amount of additional noise to counteract loss of detail during sampling; only applies to Euler, Heun, and DPM2'),
'k_sched_type':OptionInfo("Automatic","scheduler type",gr.Dropdown,{"choices":["Automatic","karras","exponential","polyexponential"]}).info("lets you override the noise schedule for k-diffusion samplers; choosing Automatic disables the three parameters below"),
'k_sched_type':OptionInfo("Automatic","Scheduler type",gr.Dropdown,{"choices":["Automatic","karras","exponential","polyexponential"]}).info("lets you override the noise schedule for k-diffusion samplers; choosing Automatic disables the three parameters below"),
'sigma_max':OptionInfo(0.0,"sigma max",gr.Number).info("0 = default (~14.6); maximum noise strength for k-diffusion noise schedule"),
'sigma_max':OptionInfo(0.0,"sigma max",gr.Number).info("0 = default (~14.6); maximum noise strength for k-diffusion noise scheduler"),
'rho':OptionInfo(0.0,"rho",gr.Number).info("0 = default (7 for karras, 1 for polyexponential); higher values result in a more steep noise schedule (decreases faster)"),
'rho':OptionInfo(0.0,"rho",gr.Number).info("0 = default (7 for karras, 1 for polyexponential); higher values result in a steeper noise schedule (decreases faster)"),
'eta_noise_seed_delta':OptionInfo(0,"Eta noise seed delta",gr.Number,{"precision":0}).info("ENSD; does not improve anything, just produces different results for ancestral samplers - only useful for reproducing images"),
'eta_noise_seed_delta':OptionInfo(0,"Eta noise seed delta",gr.Number,{"precision":0}).info("ENSD; does not improve anything, just produces different results for ancestral samplers - only useful for reproducing images"),
hr_checkpoint_name=gr.Dropdown(label='Hires checkpoint',elem_id="hr_checkpoint",choices=["Use same checkpoint"]+modules.sd_models.checkpoint_tiles(use_short=True),value="Use same checkpoint")
hr_checkpoint_name=gr.Dropdown(label='Hires checkpoint',elem_id="hr_checkpoint",choices=["Use same checkpoint"]+modules.sd_models.checkpoint_tiles(use_short=True),value="Use same checkpoint")
create_refresh_button(hr_checkpoint_name,modules.sd_models.list_models,lambda:{"choices":["Use same checkpoint"]+modules.sd_models.checkpoint_tiles(use_short=True)},"hr_checkpoint_refresh")
create_refresh_button(hr_checkpoint_name,modules.sd_models.list_models,lambda:{"choices":["Use same checkpoint"]+modules.sd_models.checkpoint_tiles(use_short=True)},"hr_checkpoint_refresh")
hr_sampler_index=gr.Dropdown(label='Hires sampling method',elem_id="hr_sampler",choices=["Use same sampler"]+[x.nameforxinsamplers_for_img2img],value="Use same sampler",type="index")
hr_sampler_name=gr.Dropdown(label='Hires sampling method',elem_id="hr_sampler",choices=["Use same sampler"]+sd_samplers.visible_sampler_names(),value="Use same sampler")
(hr_sampler_container,lambdad:gr.update(visible=True)ifd.get("Hires sampler","Use same sampler")!="Use same sampler"ord.get("Hires checkpoint","Use same checkpoint")!="Use same checkpoint"elsegr.update()),
(hr_sampler_container,lambdad:gr.update(visible=True)ifd.get("Hires sampler","Use same sampler")!="Use same sampler"ord.get("Hires checkpoint","Use same checkpoint")!="Use same checkpoint"elsegr.update()),