From 105b917d72334e1837bbba372863a1b40c191df4 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Fri, 22 Aug 2025 13:57:49 -0400 Subject: [PATCH] modernui improved image sizing Signed-off-by: Vladimir Mandic --- CHANGELOG.md | 7 +++++++ extensions-builtin/sdnext-modernui | 2 +- modules/shared.py | 2 +- modules/ui_common.py | 7 +++++-- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c6d5695b0..9bb50ef21 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log for SD.Next +## Update for 2025-08-22 + +- **UI** + - improved image scaling in img2img and control interfaces +- **Fixes** + - normalize path hanlding when deleting images + ## Update for 2025-08-20 A quick service release with several important hotfixes, improved localization support and adding new **Qwen** model variants... diff --git a/extensions-builtin/sdnext-modernui b/extensions-builtin/sdnext-modernui index da4ccd4aa..6470d3cc3 160000 --- a/extensions-builtin/sdnext-modernui +++ b/extensions-builtin/sdnext-modernui @@ -1 +1 @@ -Subproject commit da4ccd4aa75e3b42937674ba23d406a02783df4f +Subproject commit 6470d3cc3dd421b46c8cc0372aecd5e6b3ec36a4 diff --git a/modules/shared.py b/modules/shared.py index 8129cd386..525d58c8f 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -160,7 +160,7 @@ options_templates.update(options_section(('model_options', "Model Options"), { "model_h1_sep": OptionInfo("

HiDream

", "", gr.HTML), "model_h1_llama_repo": OptionInfo("Default", "LLama repo", gr.Textbox), "model_wan_sep": OptionInfo("

WanAI

", "", gr.HTML), - "model_wan_stage": OptionInfo("first", "Processing stage", gr.Radio, {"choices": ['high noise', 'low noise', 'combined'] }), + "model_wan_stage": OptionInfo("low noise", "Processing stage", gr.Radio, {"choices": ['high noise', 'low noise', 'combined'] }), "model_wan_boundary": OptionInfo(0.85, "Stage boundary ratio", gr.Slider, {"minimum": 0, "maximum": 1.0, "step": 0.05 }), })) diff --git a/modules/ui_common.py b/modules/ui_common.py index 292adcdef..046ae93b3 100644 --- a/modules/ui_common.py +++ b/modules/ui_common.py @@ -68,15 +68,18 @@ def delete_files(js_data, files, all_files, index): start_index = index deleted = [] all_files = [f.split('/file=')[1] if 'file=' in f else f for f in all_files] if isinstance(all_files, list) else [] + all_files = [os.path.normpath(f) for f in all_files] for _image_index, filedata in enumerate(files, start_index): try: - fn = filedata['name'] + fn = os.path.normpath(filedata['name']) if os.path.exists(fn) and os.path.isfile(fn): deleted.append(fn) os.remove(fn) if fn in all_files: all_files.remove(fn) - shared.log.info(f'Delete: image="{fn}"') + shared.log.info(f'Delete: image="{fn}"') + else: + shared.log.warning(f'Delete: image="{fn}" ui mismatch') base, _ext = os.path.splitext(fn) desc = f'{base}.txt' if os.path.exists(desc) and os.path.isfile(desc):