Save Images To Path with sequence number
The fast, no-metadata batch saver
- images
- IMAGE
If you've ever batch-rendered a few hundred images and watched ComfyUI's default Save Image node chug through PNG metadata writes one image at a time, this node is the fix. It's an OpenCV-based (cv2) saver, multithreaded, with no workflow metadata baked into the file. That last part is a trade, not a bug - you lose the "drag the PNG back into ComfyUI to reload the workflow" trick, but you gain real speed and the ability to save privacy-sensitive or client-facing output without your prompt and node graph riding along in the file.
What it actually does
You give it a filename template with # characters standing in for a sequence number - the default is IMG-###### - and a start_index to begin counting from. Drop that template in a subfolder path like my_folder/img_### and it'll write there too. Feed it a batch of images and it writes them all out, numbered in order, using whichever of PNG, WebP, or JPEG you pick as extension.
The inputs that matter
img_template(defaultIMG-######) - your filename pattern. The#run gets replaced by the running sequence number, padded to that many digits.start_index- where the counter begins.extension-png,webp, orjpg. PNG is lossless but slower to compress; JPEG/WebP are faster and smaller with a quality knob.quality(1–100) - controls JPEG/WebP compression. Ignored for PNG.png_compression(0–9) - PNG's own knob, separate from quality. 0 is fastest with the biggest files; the node's own tooltip recommends 1 for speed, which is the whole point of using this node over the stock saver.
Three optional toggles are worth knowing: webp_lossless forces WebP to lossless mode (and quality to 100, slower to encode); overwrite decides whether a name collision clobbers the old file or gets a -[0001]-style suffix instead; NOTSAVE skips writing to disk entirely while still passing images through - genuinely useful for testing the rest of your graph's logic without spamming your disk. show_preview just controls whether the node renders thumbnails in the UI; turn it off for max speed on big batches. The single output is the image batch passed straight through, so you can keep chaining nodes after the save.
Installing it
Through ComfyUI Manager: search ComfyUI-KYNode, install, restart. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/yorkane/ComfyUI-KYNode
Restart ComfyUI. Worth flagging up front: the pack's own README is thin - a features list, no formal install or dependency section - and it's the kind of niche personal-toolbox pack that has essentially zero footprint in the wider ComfyUI community discussion. Treat it as a grab-bag to raid for the one node you need, not a must-have install.
Common issues
The most likely startup failure is a missing cv2 - if the node fails to import, pip install opencv-python into your ComfyUI Python environment (the embedded interpreter on Windows portable builds) should fix it, since the node explicitly depends on OpenCV rather than the Pillow that ships with core ComfyUI.
Second: don't expect to reload your workflow by dragging a saved PNG back into ComfyUI - this node deliberately skips metadata for speed, so if you need that round-trip, use the stock Save Image node for those particular outputs instead and this one for everything else.
Third, on the template itself - the README doesn't spell out whether it auto-creates a missing subfolder from img_template, so if you're pointing at a folder that doesn't exist yet, create it yourself first rather than assume the node will.
Last, if your sequence numbers land shorter or longer than you expect, check that the digit count in your # run matches how many digits you actually need - a three-# template like IMG-### will only pad to 999 before it presumably overflows the format, so size the template to your batch count.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | Input image batch to be saved. | |
| img_template | STRING | IMG-###### | Filename template. Use '#' for sequence numbering (e.g., 'IMG-######'). Supports relative folders (e.g., 'my_folder/img_###'). |
| start_index | INT | 10–999999 | Starting number for the sequence (replaces '######' in the template). |
| extension | COMBO | Output file format. | |
| quality | INT | 951–100 | Quality for JPEG and WebP (1-100). Higher is better quality. Ignored for PNG. |
| png_compression | INT | 10–9 | Compression level for PNG (0-9). 0 is fastest (large file), 9 is slowest (small file). 1 is recommended for speed. |
| webp_losslessopt | BOOLEAN | false | Enable WebP lossless mode. If True, quality is forced to 100. Encode speed will be slower. |
| overwriteopt | BOOLEAN | true | If True, overwrites existing files. If False, adds a counter suffix (e.g., -[0001]) to the filename. |
| NOTSAVEopt | BOOLEAN | false | If True, skips the saving process but passes the images through. Useful for debugging logic without writing disk. |
| show_previewopt | BOOLEAN | true | If True, displays the saved images in the node UI. Disable this for maximum performance with large batches. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |