From 58f8388020ba6ab5a913beb742a6312914d640b2 Mon Sep 17 00:00:00 2001 From: comfyanonymous Date: Thu, 16 May 2024 00:11:01 -0400 Subject: [PATCH] More proper fix for #3484. --- folder_paths.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/folder_paths.py b/folder_paths.py index 48979500..234b7340 100644 --- a/folder_paths.py +++ b/folder_paths.py @@ -258,7 +258,7 @@ def get_save_image_path(filename_prefix, output_dir, image_width=0, image_height raise Exception(err) try: - counter = max(filter(lambda a: a[1][:-1] == filename and a[1][-1] == "_", map(map_filename, os.listdir(full_output_folder))))[0] + 1 + counter = max(filter(lambda a: os.path.normcase(a[1][:-1]) == os.path.normcase(filename) and a[1][-1] == "_", map(map_filename, os.listdir(full_output_folder))))[0] + 1 except ValueError: counter = 1 except FileNotFoundError: