From 41269b05c0ed9a13120c3f2a21b2d6bf207d69a3 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Tue, 22 Jul 2025 10:19:30 -0400 Subject: [PATCH] handle startup errors Signed-off-by: Vladimir Mandic --- CHANGELOG.md | 7 ++++--- extensions-builtin/stable-diffusion-webui-rembg | 2 +- javascript/changelog.js | 4 ++++ javascript/gallery.js | 4 ++++ javascript/settings.js | 4 ++++ modules/postprocess/yolo.py | 2 +- modules/ui_models.py | 2 +- 7 files changed, 19 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 435df5506..e2dc8fcc1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,8 @@ # Change Log for SD.Next -## Update for 2025-07-21 +## Update for 2025-07-22 -### Highlights for 2025-07-21 +### Highlights for 2025-07-22 Feature highlights include: - **ModernUI** layout redesign which should make it more user friendly and easier to navigate @@ -29,7 +29,7 @@ For details, see [ChangeLog](https://github.com/vladmandic/automatic/blob/master [ReadMe](https://github.com/vladmandic/automatic/blob/master/README.md) | [ChangeLog](https://github.com/vladmandic/automatic/blob/master/CHANGELOG.md) | [Docs](https://vladmandic.github.io/sdnext-docs/) | [WiKi](https://github.com/vladmandic/automatic/wiki) | [Discord](https://discord.com/invite/sd-next-federal-batch-inspectors-1101998836328697867) -### Details for 2025-07-21 +### Details for 2025-07-22 - **License** - SD.Next [license](https://github.com/vladmandic/sdnext/blob/dev/LICENSE.txt) switched from **aGPL-v3.0** to **Apache-v2.0** @@ -162,6 +162,7 @@ For details, see [ChangeLog](https://github.com/vladmandic/automatic/blob/master - remove legacy clip/blip interrogate module - remove modern-ui remove `only-original` vs `only-diffusers` code paths - refactor control processing and separate preprocessing and image save ops + - refactor modernui layouts to rely on accordions more than individual controls - split monolithic `shared.py` - cleanup `/modules`: move pipeline loaders to `/pipelines` root - cleanup `/modules`: move code folders used by pipelines to `/pipelines/` folder diff --git a/extensions-builtin/stable-diffusion-webui-rembg b/extensions-builtin/stable-diffusion-webui-rembg index b3a3a0a60..3ec8f9eb7 160000 --- a/extensions-builtin/stable-diffusion-webui-rembg +++ b/extensions-builtin/stable-diffusion-webui-rembg @@ -1 +1 @@ -Subproject commit b3a3a0a60b807a83284b90ea9567f89640967f0d +Subproject commit 3ec8f9eb796be519a98de985bac03645d0040ede diff --git a/javascript/changelog.js b/javascript/changelog.js index 97dc9daf5..65dd0ba89 100644 --- a/javascript/changelog.js +++ b/javascript/changelog.js @@ -60,6 +60,10 @@ function changelogNavigate(found) { async function initChangelog() { const search = gradioApp().querySelector('#changelog_search > label> textarea'); const md = gradioApp().getElementById('changelog_markdown'); + if (!search || !md) { + error('initChangelog', 'Missing search or markdown elements'); + return; + } const searchChangelog = async (e) => { if (changelogElements.length < 100) changelogElements = getAllChildren(md); const found = []; diff --git a/javascript/gallery.js b/javascript/gallery.js index bef7120c3..cd044c487 100644 --- a/javascript/gallery.js +++ b/javascript/gallery.js @@ -469,6 +469,10 @@ async function initGallery() { // triggered on gradio change to monitor when ui el.files = gradioApp().getElementById('tab-gallery-files'); el.status = gradioApp().getElementById('tab-gallery-status'); el.search = gradioApp().querySelector('#tab-gallery-search textarea'); + if (!el.folders || !el.files || !el.status || !el.search) { + error('initGallery', 'Missing gallery elements'); + return; + } el.search.addEventListener('input', gallerySearch); el.btnSend = gradioApp().getElementById('tab-gallery-send-image'); document.getElementById('tab-gallery-files').style.height = opts.logmonitor_show ? '75vh' : '85vh'; diff --git a/javascript/settings.js b/javascript/settings.js index 99902fb02..e5ef0e325 100644 --- a/javascript/settings.js +++ b/javascript/settings.js @@ -181,6 +181,10 @@ async function initSettings() { if (settingsInitialized) return; settingsInitialized = true; const tabNavElements = gradioApp().querySelector('#settings > .tab-nav'); + if (!tabNavElements) { + error('initSettings', 'No tab nav elements found'); + return; + } const tabNavButtons = gradioApp().querySelectorAll('#settings > .tab-nav > button'); const tabElements = gradioApp().querySelectorAll('#settings > div:not(.tab-nav)'); const observer = new MutationObserver((mutations) => { diff --git a/modules/postprocess/yolo.py b/modules/postprocess/yolo.py index 607559cf3..6d256ab94 100644 --- a/modules/postprocess/yolo.py +++ b/modules/postprocess/yolo.py @@ -387,7 +387,7 @@ class YoloRestorer(Detailer): enabled = gr.Checkbox(label="Enable detailer pass", elem_id=f"{tab}_detailer_enabled", value=False) with gr.Row(): detailers = gr.Dropdown(label="Detailer models", elem_id=f"{tab}_detailers", choices=self.list, value=shared.opts.detailer_models, multiselect=True, visible=True) - detailers_text = gr.Textbox(label="Detailer models", elem_id=f"{tab}_detailers_text", placeholder="Comma separated list of detailer models", lines=2, visible=False, interactive=True) + detailers_text = gr.Textbox(label="Detailer list", elem_id=f"{tab}_detailers_text", placeholder="Comma separated list of detailer models", lines=2, visible=False, interactive=True) refresh_btn = ui_common.create_refresh_button(detailers, self.enumerate, {}, elem_id=f"{tab}_detailers_refresh") ui_mode = ui_components.ToolButton(value=ui_symbols.view) ui_mode.click(fn=self.change_mode, inputs=[detailers, detailers_text], outputs=[detailers, detailers_text, refresh_btn]) diff --git a/modules/ui_models.py b/modules/ui_models.py index 82ed79298..1a16d1b44 100644 --- a/modules/ui_models.py +++ b/modules/ui_models.py @@ -364,7 +364,7 @@ def create_ui(): create_safetensors = gr.Checkbox(label="Save safetensors", value=True) debug = gr.Checkbox(label="Debug info", value=False) - model_modules_btn = gr.Button(value="Modules", variant='primary') + model_modules_btn = gr.Button(value="Merge Modules", variant='primary') model_modules_btn.click( fn=extras.run_model_modules, inputs=[