Save Image Batch ๐
Write a whole batch to disk with matching filenames
- images
The stock SaveImage node works fine for a batch of images too, but it doesn't give you much control over naming or where things land, and it doesn't have any obvious way to keep a batch of images lined up with a batch of prompts that produced them. SaveImageBatch is cgem156's version of that: a save node built to sit at the end of the batch_condition pipeline, next to SaveBatchString.
How it fits the pack
If you've built a workflow using BatchString/RandomColorPrompt/PrefixString โ CLIPTextEncodeBatch โ sampler, you end up with a batch of images and, separately, a batch of the prompt strings that generated them. SaveImageBatch and SaveBatchString share the same seed field pattern specifically so you can run them side by side and get an image file and a text file that correspond to each other - set the same seed on both and your filenames stay in sync.
Inputs and outputs that matter
images- the batch of images to save, straight from yourVAEDecode.folder- output subfolder. Leave blank for the default location, or set it to keep runs organized.extension- file extension, defaults topng.seed- used for naming/numbering the files, same role as onSaveBatchString.
This is an output node (is_output_node: true) with no data outputs - it terminates the graph.
Installing it
ComfyUI Manager โ search cgem156-ComfyUI๐ โ install โ restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/laksjdjf/cgem156-ComfyUI
then restart ComfyUI. Nothing extra needed for this node specifically.
Common issues & troubleshooting
Fewer files saved than images in the batch. Check that images is actually a full batch tensor and not something that got squeezed down to one image upstream - some nodes silently collapse a batch of one, and it's easy not to notice until your save count doesn't match what you expected.
Filenames don't match the prompt files from SaveBatchString. Same fix as on that node's side: make sure both save nodes are using the same seed value. They're independent fields on independent nodes, so ComfyUI won't stop you from drifting them out of sync.
Output location isn't obvious. An empty folder field falls back to ComfyUI's default output directory rather than erroring, so if you can't find your files, check there first before assuming the save failed.
PNG vs other formats. The default extension is png; if you need JPEG or WebP for a large batch to save disk space, just type the extension you want into the field - there's no dropdown limiting you to a fixed list.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | โ | |
| folder | STRING | โ | |
| extension | STRING | png | โ |
| seed | INT | 00โ18446744073709550000 | โ |
Outputs (0)
No outputs