Image Saver
The saver that stuffs your prompt into EXIF so your gallery software shows it
- images
- FILENAME
- FILE_PATH
ComfyUI's built-in saver is fine, but it buries your workflow in the PNG workflow chunk, which is invisible unless you drag the image back into ComfyUI. Image Saver does the thing you actually want when you're building a library of outputs: it writes your prompt and settings into the standard EXIF UserComment tag, so XnView MP, digiKam, or any EXIF-aware viewer shows you the recipe right next to the picture. No special software required.
It's part of the Open Creative Studio Nodes pack, and the README credits receyuki's SD Prompt Saver and willmiao's Save Image (LoraManager) as its lineage - both popular save nodes in their own right.
How it works
It's a proper output node (OUTPUT_NODE = True), meaning it doesn't feed anything downstream - it finishes the graph. For each image it: resolves the filename and folder from your tokens, saves the file in the format you chose, and - if you filled in EXIF_UserComment - writes that text into the EXIF UserComment tag (tag 0x9286, encoded UTF-16BE per the EXIF spec) using piexif. For PNG it can additionally embed the full workflow in the workflow metadata chunk, which is what keeps "drag back into ComfyUI" working.
The inputs that matter
- images - required, the batch to save.
- filename - the template. Supports
%seed%,%date%,%time%, and%counter%(the counter is added automatically for batches). Default:%seed_%date_%time_final_OCS. - path - a subfolder under ComfyUI's
outputdirectory. Default%date/means one folder per day, which is honestly the best default in the pack. - image_format -
png,jpg,jpeg, orwebp. - EXIF_UserComment - the multiline text (prompt, settings, whatever) that lands in the EXIF tag. The whole point of the node.
- embed_workflow - embeds the complete workflow into the image metadata. One small honesty note: the tooltip says PNG and WebP, but the current code actually writes the workflow chunk for PNG only - WebP saves come out without it. If recoverable workflows matter, save PNG.
- seed - used by
%seed%in the filename; pass the actual seed so your filenames carry it.
It also exposes lossless_webp and jpg_webp_quality if you're compressing.
Outputs
FILENAME and FILE_PATH, both strings. Since it's an output node these mostly matter for logging or for feeding a "batch done" node, but they're there if you want to route the saved path elsewhere.
Install
ComfyUI Manager → "Open Creative Studio Nodes" → install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/alessandroperilli/OCS_Nodes
The pack declares no extra requirements - it uses PIL, piexif, and ComfyUI's own folder_paths, all of which ship with a standard install.
Where people get burned
- EXIF silently does nothing if
piexifis missing. The code wraps EXIF writing in a try/except and just prints an error, so a bare Python environment withoutpiexifgives you no warning in the UI. If your files come out EXIF-free, check the console - that's usually the culprit. - JPG and workflow-embedding don't mix.
embed_workflowwrites the workflow chunk for PNG (and claims WebP, though the current code doesn't deliver it there). If you need both EXIF and a recoverable workflow, PNG is your format. - The EXIF tag is for humans, not ComfyUI. XnView MP will display it; ComfyUI won't restore the workflow from EXIF alone - that's what the embedded workflow chunk is for.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| filenameopt | STRING | %seed_%date_%time_final_OCS | — |
| pathopt | STRING | %date/ | — |
| seedopt | INT | 00–18446744073709550000 | — |
| image_formatopt | COMBO | 4 options: png, jpg, jpeg, webp | |
| lossless_webpopt | BOOLEAN | true | — |
| jpg_webp_qualityopt | INT | 1001–100 | — |
| date_formatopt | STRING | %Y-%m-%d | — |
| time_formatopt | STRING | %H%M%S | — |
| EXIF_UserCommentopt | STRING | — | |
| embed_workflowopt | BOOLEAN | true | Embeds the complete workflow data into the image metadata. Only works with PNG and WebP formats. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| FILENAME | STRING | — |
| FILE_PATH | STRING | — |