Save Image (Exact Filename)
SaveImageExact and the End of the _00001_ Suffix
- images
Core ComfyUI's SaveImage is a great node with one annoying habit: whatever you type as filename_prefix, it appends an auto-incrementing counter. my_render_00001_.png, my_render_00002_.png. There is no setting that turns it off - people have asked, and the answer is always "grab a custom save node." SaveImageExact is that node. Type a name, get that name, no counter bolted on. It's a one-job utility, and the job is "filenames you can predict."
Why does that matter? Two reasons. First, automation: if you're driving ComfyUI from a script and need to know the output path before the run finishes - so you can hand it to the next step without parsing the history API - you can't do that when the name has a random-looking number in it. The pack's own docs mention pipeline.py-style flows, and that's exactly the use case. Second, aesthetics: when your seed is already in the filename, a trailing counter is just noise. This node respects the extension you give it too, so render_01.png saves as render_01.png, not render_01_.png.
How it names files
The scheme is dead simple and consistent across the pack: filename_prefix is the folder, filename is the file. The final path is ComfyUI/output/<filename_prefix>/<filename>. Prefix can hold slashes to make nested folders, and filename can too - scene01/shot03 inside a prefix becomes prefix/scene01/shot03.png. If your name already ends in a known media extension (.png, .jpg, .webp), it's honored; otherwise the format drop-down supplies the extension.
Two details that bite people:
- Leave
filenameempty and you're back to counter-land - it falls back to auto-incrementing00001.ext,00002.ext, starting at the highest existing number in the folder. So "exact filename" means "exact when you give a name," not "never numbered." - Batch images save as
base_0.ext,base_1.ext... when you feed more than one image in. No way around that, and you don't want one: the suffix is what keeps the files distinct.
There's also a small overwrite toggle, default on. Flip it off and a collision doesn't silently rename - it raises an error and stops the run. That's deliberate: silent renaming would defeat the whole "predictable path" point.
The inputs that matter
images- the IMAGE tensor from your sampler/VAE chain.filename_prefix- the subfolder. Empty means "root of output/."filename- the exact name, minus extension if you prefer. This is the one you'll actually type.format- png (default), jpg, webp. Keep png for your masters.quality- 1–100, default 95, applies to jpg/webp only. PNG ignores it.embed_workflow- default on; writes thepromptandextra_pnginfochunks into the PNG so dragging the file back rebuilds the graph.
It's an output node: no data comes out, but it always runs, and your file lands in ComfyUI/output/ like any core save.
Install and gotchas
ComfyUI Manager: search "comfyui-save-exact" and install. Or, old-school:
cd ComfyUI/custom_nodes
git clone https://github.com/windskyer/comfyui-save-exact
Restart ComfyUI. No model downloads, no heavy dependencies - the requirements.txt just declares numpy, Pillow, and av, all of which ship with a modern ComfyUI already.
Two honest caveats. The README is one line long, so treat the source as the docs. And remember overwrite=True (the default) means a name you've already used gets overwritten - useful for re-renders, terrifying if you were relying on the old counter to keep history. That's the trade you're making: predictable names, your responsibility to keep them distinct.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| filename_prefix | STRING | — | |
| filenameopt | STRING | — | |
| formatopt | COMBO | png | 3 options: png, jpg, webp |
| qualityopt | INT | 951–100 | — |
| overwriteopt | BOOLEAN | true | — |
| embed_workflowopt | BOOLEAN | true | — |
Outputs (0)
No outputs