diff options
author | Rae Fu <rraefu@gmail.com> | 2022-10-13 23:00:38 -0600 |
---|---|---|
committer | Rae Fu <rraefu@gmail.com> | 2022-10-14 14:09:23 -0600 |
commit | e21f01f64504bc651da6e85216474bbd35ee010d (patch) | |
tree | 1ee73a3e7b4eab910464cd6a36986c1c19f0152c /modules/shared.py | |
parent | 494afccbc1d7b0aca4ffeb3d8354b09c414d95f4 (diff) |
add checkpoint cache option to UI for faster model switching
switching time reduced from ~1500ms to ~280ms
Diffstat (limited to 'modules/shared.py')
-rw-r--r-- | modules/shared.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/shared.py b/modules/shared.py index 5901e605..b2090da1 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -238,6 +238,7 @@ options_templates.update(options_section(('training', "Training"), { options_templates.update(options_section(('sd', "Stable Diffusion"), {
"sd_model_checkpoint": OptionInfo(None, "Stable Diffusion checkpoint", gr.Dropdown, lambda: {"choices": modules.sd_models.checkpoint_tiles()}, refresh=sd_models.list_models),
+ "sd_checkpoint_cache": OptionInfo(0, "Checkpoints to cache in RAM", gr.Slider, {"minimum": 0, "maximum": 10, "step": 1}),
"sd_hypernetwork": OptionInfo("None", "Hypernetwork", gr.Dropdown, lambda: {"choices": ["None"] + [x for x in hypernetworks.keys()]}, refresh=reload_hypernetworks),
"sd_hypernetwork_strength": OptionInfo(1.0, "Hypernetwork strength", gr.Slider, {"minimum": 0.0, "maximum": 1.0, "step": 0.001}),
"img2img_color_correction": OptionInfo(False, "Apply color correction to img2img results to match original colors."),
|