Use one counter across full save path
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user