Save Preview Images
Format, Quality, Workflow JSON, and Date-Stamped Folders
- images
ComfyUI's built-in SaveImage gets the job done, but it's terse. Save Preview Images is the same idea with opinions: PNG or JPG, a quality slider, PNG metadata on or off, date-stamped output folders, workflow-as-JSON export, and a preview-only mode so you can glance at results without committing them to disk. If you're archiving generations, sharing workflows, or just tired of hunting through a flat output/ folder, this is the node that fixes the boring part of the pipeline.
How it works
It's an output node - nothing comes out the right side. The images input goes in, files come out, and the preview shows up in the UI. Under the hood it's the standard ComfyUI save path with a few switches:
- format -
pngorjpg. PNG compression is driven by thequalityslider too (it maps to a compress level), even though the tooltip says "jpg only" - worth knowing because the slider isn't as ignored as the label suggests. - meta_data_png - writes the
promptand fullworkflowinto the PNG's text chunks. This is the load-bearing feature, because in this ecosystem the workflow is the project file: image-io-metadata puts it plainly - drag the PNG back onto the canvas and the whole graph rebuilds. Leave this on for anything you might want to reconstruct later. - save_workflow_as_json - writes a
.jsonsidecar next to the image with the same name. This is your escape hatch if you're saving JPG (which can't hold PNG metadata chunks): the workflow survives as a separate file. - custom_path - a folder, with
%date(YYYY-MM-DD) and%time(HH-MM-SS) placeholders, e.g.outputs/%date. The directory is created automatically. Leave it empty for ComfyUI's default output folder. - filename_prefix - same placeholders, plus a
timestampmode:second,millisecond, or a plain counter. Existing files get a bumped counter rather than overwritten. - preview and save_image - the interesting combo.
previewrenders a preview into ComfyUI's temp directory so you can see the result on canvas.save_imagedecides whether anything actually hits disk. Set save_image off, preview on, and you've got a zero-clutter "just show me" node.
The trap to dodge
JPG users, this one's for you. JPEG can't hold ComfyUI's workflow chunks - the metadata dies on re-encode, which is why image-io-metadata keeps a running list of everything that strips it. If you save JPG, the workflow is gone from the file unless you also flipped save_workflow_as_json on. Want a self-contained, drag-back-and-rebuild file? Save PNG with meta_data_png enabled. Want small files? JPG plus the JSON sidecar. Pick deliberately.
Install
Same as the rest of the pack - ComfyUI Manager (search "ComfyUI-zyd232-Nodes") or:
cd ComfyUI/custom_nodes
git clone https://github.com/zyd232/ComfyUI-zyd232-Nodes.git
Restart, find Save Preview Images under zyd232 Nodes. It leans on Pillow and numpy, both already present in any ComfyUI install - no extra dependencies. And the standing caveat for this pack applies: it's built on the newer V3 backend node API, so a too-old ComfyUI won't register it.
Bottom line
SaveImage does one thing; this does the same one thing with the switches you'll actually want at some point - format control, date-organized folders, workflow JSON export, and a preview-only mode. It won't make your images better, but it'll make finding them later a lot less painful.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | Images to save | |
| save_image | BOOLEAN | true | Whether to save the images to disk |
| save_workflow_as_json | BOOLEAN | false | Whether to save the workflow as a JSON file |
| preview | BOOLEAN | true | Whether to generate preview images |
| format | COMBO | Output image format | |
| quality | INT | 850–100 | Image quality (jpg only) |
| meta_data_png | BOOLEAN | true | Whether to write prompt info into PNG metadata |
| custom_path | STRING | Custom save path. Supports date placeholders: the core style %date:yyyy-MM-dd%, or the shorthand %date / %time. | |
| filename_prefix | STRING | ComfyUI_ | Filename prefix. Supports date placeholders: the core style %date:yyyy-MM-dd%, or the shorthand %date / %time. |
| timestamp | COMBO | Filename timestamp mode |
Outputs (0)
No outputs