From 23a4e6f97f6d7812b3f258ffc989a4b94e90ea23 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Mon, 21 Jul 2025 11:15:15 -0400 Subject: [PATCH] cleanup Signed-off-by: Vladimir Mandic --- TODO.md | 1 - modules/images.py | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/TODO.md b/TODO.md index 0fddce9e6..08b77b353 100644 --- a/TODO.md +++ b/TODO.md @@ -51,7 +51,6 @@ Main ToDo list can be found at [GitHub projects](https://github.com/users/vladma - [Magi](https://github.com/SandAI-org/MAGI-1)(https://github.com/huggingface/diffusers/pull/11713) - [SEVA](https://github.com/huggingface/diffusers/pull/11440) #### External:Unified/MultiModal -- [Bagel](https://huggingface.co/ByteDance-Seed/BAGEL-7B-MoT)(https://github.com/bytedance-seed/bagel) - [Ming](https://github.com/inclusionAI/Ming) - [Liquid](https://github.com/FoundationVision/Liquid) #### External:Image2Image/Editing diff --git a/modules/images.py b/modules/images.py index 9c9a75b1f..7ba9f9c50 100644 --- a/modules/images.py +++ b/modules/images.py @@ -172,12 +172,12 @@ def save_image(image, else: file_decoration = "[seq]-[prompt_words]" file_decoration = namegen.apply(file_decoration) - file_decoration += suffix if suffix is not None else '' + file_decoration += suffix if file_decoration.startswith(basename): basename = '' filename = os.path.join(path, f"{file_decoration}.{extension}") if basename == '' else os.path.join(path, f"{basename}-{file_decoration}.{extension}") else: - forced_filename += suffix if suffix is not None else '' + forced_filename += suffix if forced_filename.startswith(basename): basename = '' filename = os.path.join(path, f"{forced_filename}.{extension}") if basename == '' else os.path.join(path, f"{basename}-{forced_filename}.{extension}")