Preview Image - Ad-hoc Save (IMGNR)
Preview now, save the good ones after — without re-running the workflow
- images
- mask
- image
- mask
- filename_prefix
- counter_out
- full_filename
Standard ComfyUI forces a fork in the road: either you save everything (and wade through 400 near-identical PNGs to find the two you like) or you only preview (and re-run the whole workflow when you finally decide one is a keeper). Ad-hoc Save (IMGNR) is the third option, and it's quietly the most useful node in this pack.
It previews like a disposable node by default - nothing written to disk - but every preview carries a Save button. See a result you want? Click it, and the image is written to your output folder without re-running the generation. The preview's gone on reload, the saved file is permanent. The author's own use case, straight from his launch post: your upscaler or detailer pass produces a keeper, and you save just that one without paying for another full pipeline run.
How it works
On every execution the node caches the current prompt and workflow metadata against its node id, then renders the preview as base64 in the browser (same trick as the No Save sibling). Clicking Save fires a POST to a small API endpoint (/imgnr/save_manual) that decodes that cached image and writes it to your output folder - with full PNG workflow metadata embedded if embed_workflow is on, which is how "workflow included" sharing stays intact. Because the metadata was cached at generation time, the manual save works even outside the execution loop. That was a genuine bug early on (workflow metadata missing on manual save) and it's fixed.
The inputs that matter
filename_prefix- where and what to save. Defaults toComfyUI, and it accepts ComfyUI's formatting variables:%date:yyyy-MM-dd%, or%Empty Latent Image.width%to pull values from other nodes. This was renamed fromfilename_mainin v3.4.0, so old workflows referencing the old name will need a nudge.counter+add_counter- the auto-numbering. This is the clever bit: the node exposescounter_out, so you can wire several Ad-hoc Save nodes together (original vs. upscaled) and keep them on the same index. The author's example gives youComfyUI_00001andComfyUI_00001_SEEDVRinstead of two counters drifting apart.filename_extras- free text appended after the counter (no formatting applied, per the tooltip).autosave- set true and the next run saves automatically, giving you one-shot "save this batch" behavior without hunting for a button.overwrite- false by default; a name collision silently becomes_001,_002, so you never clobber an existing file.
Outputs are image and mask (pass-through), plus filename_prefix, counter_out (INT), and full_filename (STRING) - so downstream nodes can know exactly where the file landed.
Gotchas
The overwrite quirk can surprise you: with it off, repeated manual saves of the "same" file don't overwrite - they pile up as numbered variants. That's usually what you want, but if you're re-saving a fixed slot (like a portfolio cover), flip it on. And the filename_main → filename_prefix rename in v3.4.0 is the kind of silent breaking change that makes loaded workflows fail to find a widget - check the changelog if a downloaded workflow uses this node.
Installing it
Zero dependencies, as with the rest of ComfyUI-IMGNR-Utils - the pyproject ships an empty dependency list, so there's nothing to pip and no models to fetch:
cd ComfyUI/custom_nodes
git clone https://github.com/ImagineerNL/ComfyUI-IMGNR-Utils
or search "ComfyUI-IMGNR-Utils" in ComfyUI Manager and restart. The node shows up under IMGNR alongside its No Save and Compare siblings. If you want the A/B-compare tools bolted on, use the Compare variant instead - same inputs, plus slider/blink comparison against your last generation.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| filename_prefix | STRING | ComfyUI | The prefix for the file to save. This may include formatting information such as %date:yyyy-MM-dd% or %Empty Latent Image.width% to include values from nodes. |
| counter | INT | 10–999999 | — |
| add_counter | BOOLEAN | true | — |
| filename_extras | STRING | Text to add after the counter.(no formatting) | |
| autosave | BOOLEAN | false | — |
| embed_workflow | BOOLEAN | true | — |
| overwrite | BOOLEAN | false | — |
| maskopt | MASK | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| mask | MASK | — |
| filename_prefix | STRING | — |
| counter_out | INT | — |
| full_filename | STRING | — |