Use one counter across full save path

This commit is contained in:
2026-08-05 13:59:41 +00:00
parent d89335f1eb
commit b865af5384
3 changed files with 42 additions and 9 deletions
+17
View File
@@ -204,6 +204,23 @@ class DumasImageNodeTests(unittest.TestCase):
saved_names = [os.path.basename(path) for path, _args, _kwargs in FakePILImage.saved_paths]
self.assertEqual(saved_names, ["counter_001.png", "counter_002.png"])
def test_save_image_uses_same_counter_for_folder_and_filename(self):
node = self.image_nodes.DumasSaveImageNode()
image = FakeTensorBatch()
node.save_images(
images=image,
folder=self.temp_dir,
pattern="Char%counter%/Char%counter%",
format="png",
quality=100,
embed_workflow=False,
save_on_run=True,
)
saved_path = FakePILImage.saved_paths[0][0].replace("\\", "/")
self.assertTrue(saved_path.endswith("/Char001/Char001.png"))
def test_save_image_returns_ui_entries_for_output_folder(self):
node = self.image_nodes.DumasSaveImageNode()
image = FakeTensorBatch()