diff --git a/extensions-builtin/sd-webui-controlnet b/extensions-builtin/sd-webui-controlnet index cdba83b6e..2e0dc37d2 160000 --- a/extensions-builtin/sd-webui-controlnet +++ b/extensions-builtin/sd-webui-controlnet @@ -1 +1 @@ -Subproject commit cdba83b6e1a59f3b59bbcf5f0a6e0a585d666a01 +Subproject commit 2e0dc37d222aaba355a71dac0eda4bb7ca54f05f diff --git a/javascript/ui.js b/javascript/ui.js index 9313c75c6..14eff9927 100644 --- a/javascript/ui.js +++ b/javascript/ui.js @@ -260,6 +260,19 @@ onUiUpdate(() => { }); }; } + const settings_search = gradioApp().querySelectorAll('#settings_search > label > textarea')[0]; + settings_search.oninput = (e) => { + gradioApp().querySelectorAll('#settings > div').forEach((elem) => { + elem.style.display = 'block'; + }); + gradioApp().querySelectorAll('#tab_settings .tabitem').forEach((section) => { + section.querySelectorAll('.block').forEach((setting) => { + const visible = setting.innerText.toLowerCase().includes(e.target.value.toLowerCase()) || setting.id.toLowerCase().includes(e.target.value.toLowerCase()); + const el = setting.parentElement.classList.contains('form') ? setting.parentElement : setting; // if parent is form use that instead + el.style.display = visible ? 'block' : 'none'; + }); + }); + }; }); onOptionsChanged(() => { diff --git a/modules/shared.py b/modules/shared.py index 40f7e6a8d..7050ddde7 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -444,7 +444,7 @@ options_templates.update(options_section(('ui', "Live previews"), { "live_previews_enable": OptionInfo(True, "Show live previews of the created image"), "show_progress_grid": OptionInfo(True, "Show previews of all images generated in a batch as a grid"), "notification_audio_enable": OptionInfo(False, "Play a sound when images are finished generating"), - "notification_audio_path": OptionInfo("html/notification.mp3","Path to notification sound",component_args=hide_dirs), + "notification_audio_path": OptionInfo("html/notification.mp3","Path to notification sound", component_args=hide_dirs), "show_progress_every_n_steps": OptionInfo(1, "Show new live preview image every N sampling steps. Set to -1 to show after completion of batch.", gr.Slider, {"minimum": -1, "maximum": 32, "step": 1}), "show_progress_type": OptionInfo("Approx NN", "Image creation progress preview mode", gr.Radio, {"choices": ["Full", "Approx NN", "Approx cheap"]}), "live_preview_content": OptionInfo("Combined", "Live preview subject", gr.Radio, {"choices": ["Combined", "Prompt", "Negative prompt"]}), diff --git a/modules/ui.py b/modules/ui.py index 33e4dcffd..1b2c6c836 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -1323,9 +1323,10 @@ def create_ui(): unload_sd_model = gr.Button(value='Unload checkpoint', variant='primary', elem_id="sett_unload_sd_model") reload_sd_model = gr.Button(value='Reload checkpoint', variant='primary', elem_id="sett_reload_sd_model") # reload_script_bodies = gr.Button(value='Reload scripts', variant='primary', elem_id="settings_reload_script_bodies") + with gr.Row(): + _settings_search = gr.Text(label="Search", elem_id="settings_search") # TODO settings search result = gr.HTML(elem_id="settings_result") - quicksettings_names = opts.quicksettings_list quicksettings_names = {x: i for i, x in enumerate(quicksettings_names) if x != 'quicksettings'} quicksettings_list = [] diff --git a/modules/ui_extensions.py b/modules/ui_extensions.py index 4c566e332..9be1c3400 100644 --- a/modules/ui_extensions.py +++ b/modules/ui_extensions.py @@ -18,7 +18,7 @@ sort_ordering = { "user extensions": (True, lambda x: x.get('sort_user', '')), "update avilable": (True, lambda x: x.get('sort_update', '')), "updated date": (True, lambda x: x.get('updated', '2000-01-01T00:00')), - "created date": (False, lambda x: x.get('created', '2000-01-01T00:00')), + "created date": (True, lambda x: x.get('created', '2000-01-01T00:00')), "name": (False, lambda x: x.get('name', '').lower()), "enabled": (False, lambda x: x.get('sort_enabled', '').lower()), "size": (True, lambda x: x.get('size', 0)),