fix settings refresh button

This commit is contained in:
Vladimir Mandic
2023-09-08 08:34:27 -04:00
parent 0194620ec2
commit 5b41115bc8
4 changed files with 3 additions and 5 deletions
-1
View File
@@ -140,7 +140,6 @@ def checkpoint_tiles(use_short=False): # pylint: disable=unused-argument
return int(name) if name.isdigit() else name.lower()
def alphanumeric_key(key):
return [convert(c) for c in re.split('([0-9]+)', key)]
print('HERE', len(checkpoints_list.values()))
return sorted([x.title for x in checkpoints_list.values()], key=alphanumeric_key)
-1
View File
@@ -52,7 +52,6 @@ def get_filename(filepath):
def refresh_vae_list():
print('HERE')
global vae_path # pylint: disable=global-statement
vae_path = shared.opts.vae_dir
vae_dict.clear()
+1 -1
View File
@@ -633,7 +633,7 @@ options_templates.update(options_section(('interrogate', "Interrogate"), {
"interrogate_clip_min_length": OptionInfo(32, "Interrogate: minimum description length", gr.Slider, {"minimum": 1, "maximum": 128, "step": 1}),
"interrogate_clip_max_length": OptionInfo(192, "Interrogate: maximum description length", gr.Slider, {"minimum": 1, "maximum": 256, "step": 1}),
"interrogate_clip_dict_limit": OptionInfo(2048, "CLIP: maximum number of lines in text file"),
"interrogate_clip_skip_categories": OptionInfo(["artists", "movements", "flavors"], "CLIP: skip inquire categories", gr.CheckboxGroup, lambda: {"choices": modules.interrogate.category_types()}, refresh=modules.interrogate.category_types),
"interrogate_clip_skip_categories": OptionInfo(["artists", "movements", "flavors"], "Interrogate: skip categories", gr.CheckboxGroup, lambda: {"choices": modules.interrogate.category_types()}, refresh=modules.interrogate.category_types),
"interrogate_deepbooru_score_threshold": OptionInfo(0.65, "Interrogate: deepbooru score threshold", gr.Slider, {"minimum": 0, "maximum": 1, "step": 0.01}),
"deepbooru_sort_alpha": OptionInfo(False, "Interrogate: deepbooru sort alphabetically"),
"deepbooru_use_spaces": OptionInfo(False, "Use spaces for tags in deepbooru"),
+2 -2
View File
@@ -928,11 +928,11 @@ def create_ui(startup_timer = None):
if info.refresh is not None:
if is_quicksettings:
res = comp(label=info.label, value=fun(), elem_id=elem_id, **args)
create_refresh_button(res, info.refresh, args, f"refresh_{key}")
create_refresh_button(res, info.refresh, info.component_args, f"refresh_{key}")
else:
with FormRow():
res = comp(label=info.label, value=fun(), elem_id=elem_id, **args)
create_refresh_button(res, info.refresh, args, f"refresh_{key}")
create_refresh_button(res, info.refresh, info.component_args, f"refresh_{key}")
else:
try:
res = comp(label=info.label, value=fun(), elem_id=elem_id, **args)