Skip to content

Commit 63485b2

Browse files
committed
option use short name for checkpoint dropdown
1 parent e4726cc commit 63485b2

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

modules/shared_items.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ def refresh_unet_list():
4444
modules.sd_unet.list_unets()
4545

4646

47-
def list_checkpoint_tiles():
47+
def list_checkpoint_tiles(use_short=False):
4848
import modules.sd_models
49-
return modules.sd_models.checkpoint_tiles()
49+
return modules.sd_models.checkpoint_tiles(use_short)
5050

5151

5252
def refresh_checkpoints():

modules/shared_options.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@
133133
}))
134134

135135
options_templates.update(options_section(('sd', "Stable Diffusion"), {
136-
"sd_model_checkpoint": OptionInfo(None, "Stable Diffusion checkpoint", gr.Dropdown, lambda: {"choices": shared_items.list_checkpoint_tiles()}, refresh=shared_items.refresh_checkpoints, infotext='Model hash'),
136+
"sd_model_checkpoint": OptionInfo(None, "Stable Diffusion checkpoint", gr.Dropdown, lambda: {"choices": shared_items.list_checkpoint_tiles(shared.opts.sd_checkpoint_dropdown_use_short)}, refresh=shared_items.refresh_checkpoints, infotext='Model hash'),
137137
"sd_checkpoints_limit": OptionInfo(1, "Maximum number of checkpoints loaded at the same time", gr.Slider, {"minimum": 1, "maximum": 10, "step": 1}),
138138
"sd_checkpoints_keep_in_cpu": OptionInfo(True, "Only keep one model on device").info("will keep models other than the currently used one in RAM rather than VRAM"),
139139
"sd_checkpoint_cache": OptionInfo(0, "Checkpoints to cache in RAM", gr.Slider, {"minimum": 0, "maximum": 10, "step": 1}).info("obsolete; set to 0 and use the two settings above instead"),
@@ -261,6 +261,7 @@
261261
"ui_tab_order": OptionInfo([], "UI tab order", ui_components.DropdownMulti, lambda: {"choices": list(shared.tab_names)}).needs_reload_ui(),
262262
"hidden_tabs": OptionInfo([], "Hidden UI tabs", ui_components.DropdownMulti, lambda: {"choices": list(shared.tab_names)}).needs_reload_ui(),
263263
"ui_reorder_list": OptionInfo([], "txt2img/img2img UI item order", ui_components.DropdownMulti, lambda: {"choices": list(shared_items.ui_reorder_categories())}).info("selected items appear first").needs_reload_ui(),
264+
"sd_checkpoint_dropdown_use_short": OptionInfo(False, "Use short name for Stable Diffusion checkpoint dropdown"),
264265
"hires_fix_show_sampler": OptionInfo(False, "Hires fix: show hires checkpoint and sampler selection").needs_reload_ui(),
265266
"hires_fix_show_prompts": OptionInfo(False, "Hires fix: show hires prompt and negative prompt").needs_reload_ui(),
266267
"disable_token_counters": OptionInfo(False, "Disable prompt token counters").needs_reload_ui(),

0 commit comments

Comments
 (0)