DataSet_SaveImagePro
Save Images With Real Filenames, Not Prefix_00001
- images
The "Pro" here is the ability to name your files. Where DataSet_SaveImage numbers everything Prefix_00001.png, DataSet_SaveImagePro takes a list of names and saves each image under its own. That's the feature that makes this the right node for building a proper training dataset, where every image needs to come out with a meaningful name - ideally matching its caption file - instead of a counter.
Think of the flow: you load a folder of images, caption them, and you want the saved images to land with the same base names as their captions. SaveImagePro lets you pass the source filenames straight through, so photo_042.png comes out as photo_042.png (or .jpg), sitting next to photo_042.txt. It's a small thing that removes a whole class of filename-matching pain.
Inputs
- images - the batch of IMAGE tensors. List-aware input, one per name.
- names - the filenames, as a list. One name per image, in the same order. Extensions are added for you from
image_format. - destination - target folder, created if missing.
- image_format -
pngorjpg. PNG keeps quality lossless; jpg gets you smaller files, and there's a matching quality control. - image_quality - 1 to 100, default 100. Only affects jpg (PNG is lossless regardless).
No outputs - it's a terminal save node.
How it works
It's the same PIL/numpy conversion as its sibling, plus a names list and a format choice. Save jpg with quality=85 and files shrink dramatically; save png and you get lossless output with embedded workflow metadata (prompt and extra_pnginfo), assuming you haven't disabled metadata in ComfyUI.
Pairing with the caption pipeline
This is where it shines. DataSet_LoadImage gives you image_name_without_extension for every image. Feed that into names, feed the images into images, and the saved files keep their original names - which is exactly the naming you want when you're about to hand the folder to a trainer. Combined with DataSet_TextFilesSave writing captions under the same names, the whole dataset lines up without any manual renaming.
Installing
Pack standard:
cd ComfyUI/custom_nodes
git clone https://github.com/daxcay/ComfyUI-DataSet.git
cd ComfyUI-DataSet && pip install -r requirements.txt
Restart and look under 🔶DATASET🔶.
Common issues
The list-order requirement is the one that bites. names must be the same length and order as images, or you'll get mismatched filenames - image 3 wearing image 1's name. If you're pulling names from a DataSet_LoadImage and images from a different node, make sure both lists come from the same source and stay in sync. And duplicate names in the list mean overwrites, silently. It's the standard dataset-org discipline: keep names unique, keep order locked, and spot-check the first few outputs before running a big batch.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| names | STRING | — | |
| destination | STRING | — | |
| image_format | COMBO | 2 options: png, jpg | |
| image_quality | INT | 1001–100 | — |
Outputs (0)
No outputs