Save Image With Info
The output node that doesn't throw away your image metadata
- image
ComfyUI's built-in Save Image is fine until it isn't. It writes PNG, embeds the workflow JSON so you can drag the file back onto the canvas, and quietly destroys everything else - your DPI, your EXIF, and any chance of saving as anything but PNG. If you've ever needed a JPG for a photo upload site or wanted a real camera's EXIF data to survive a round-trip, you've hit that wall. Save Image With Info is the output node that refuses to lose all of that.
It's the save half of a two-node pack (sjh00/ComfyUI-LoadImageWithInfo), designed to pair with its sibling Load Image With Info, which reads filename, format, DPI, dimensions, file size, and EXIF off a loaded image. Wire them together - load an image, send its metadata to the save node - and you can re-save an edited photo in a new format without the metadata silently disappearing. On its own it still earns its place: it's a terminal output node (same category as the built-in SaveImage, nothing comes out of it) that saves wherever ComfyUI writes its outputs, with far more control over the file it produces.
Mechanically it's a thin, honest wrapper. Your IMAGE tensor gets converted to a PIL image, the dpi value you pass gets written into the file's DPI info, and then it hands the whole thing to PIL's img.save() with format-specific settings. The PNG path embeds your prompt and workflow via PngInfo, so you keep the "workflow included" sharing culture intact. That's the part worth calling out: metadata preservation here isn't magic, it's just Pillow being told not to drop fields it normally would.
The inputs that actually matter:
format-original,avif,webp,jpg,png, ortiff. Withoriginal, it saves as whateveroriginal_formatsays (defaultpng) - that's the slot you feedLoad Image With Info'sformatoutput into.quality- 1–100. The tooltip tells you the real story: AVIF 60 ≈ WebP 90, so quality is per-format. PNG ignores it entirely (compression is fixed at level 4, deliberately). Set 100 and WebP/AVIF go lossless.exif- a JSON string of EXIF tags. JPG is the only format that actually writes them.dpi,always_save_png,image_preview- DPI value, whether to also drop a PNG copy into aLoadImageWithInfoPNGfolder in your output dir, and the preview toggle.
Install is the usual: ComfyUI Manager, search "ComfyUI LoadImageWithInfo", restart. Or cd ComfyUI/custom_nodes && git clone https://github.com/sjh00/ComfyUI-LoadImageWithInfo, restart. One real dependency: pillow-avif-plugin - it's the entire requirements.txt, and the node imports it at module load. Manager handles it; if you clone manually and AVIF support is missing, pip install pillow-avif-plugin and restart, or the node refuses to load at all.
Where people get burned: EXIF only survives on JPG - save as WebP or AVIF and it's ignored, per the README. ComfyUI-generated images usually have no EXIF and a default 96 DPI, so don't expect magic from AI output; this node shines on real photos. If a format can't be written, it silently falls back to PNG. And duplicate filenames get auto-incremented (image_1.png), so no overwriting, but also no quiet surprises if you weren't expecting the suffix. The name is a slight lie - it calls no API and needs no key - it just saves files the way you asked, metadata included.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| filename | STRING | image | — |
| format | COMBO | original | 6 options: original, avif, webp, jpg, png, tiff |
| original_format | STRING | png | — |
| quality | INT | 951–100 | Quality for JPEG/WebP/AVIF formats; Quality is relative to each format. * Example: AVIF 60 is same quality as WebP 90. * PNG compression is fixed at 4 and not affected by this. PNG compression times skyrocket above level 4 for zero benefits on filesize. |
| dpi | INT | 96 | — |
| exif | STRING | {} | — |
| always_save_png | BOOLEAN | true | 总是保存为PNG格式,即使选择了其他格式。 |
| image_preview | BOOLEAN | true | Turns the image preview on and off |
Outputs (0)
No outputs