feat(save-image): add %batch_num% support in batch loop

This commit is contained in:
Will Miao
2026-06-22 08:44:00 +08:00
parent 26c54fd358
commit 7438072f8c

View File

@@ -608,7 +608,7 @@ class SaveImageLM:
img = Image.fromarray(np.clip(img, 0, 255).astype(np.uint8))
# Generate filename with counter if needed
base_filename = filename
base_filename = filename.replace("%batch_num%", str(i))
if add_counter_to_filename:
# Use counter + i to ensure unique filenames for all images in batch
current_counter = counter + i