Nodes/AAA Metadata System/Save Image with Metadata (Simple)
ComfyUI Node

Save Image with Metadata (Simple)

Save Image With Metadata Without Setting Up a Single Thing

By EricRollei·Created 10 months ago·Updated 9 months ago· 13
Save Image with Metadata (Simple)
  • images
  • images
  • filepath
filename_prefixComfyUI
file_formatpng
include_projectfalse
include_datetimetrue
custom_output_directory
output_path_modeSubfolder in Output
filename_formatDefault (padded zeros)
quality_presetBest Quality
color_profilesRGB v4 Appearance
rendering_intentRelative Colorimetric
bit_depth8-bit
alpha_modeauto
matte_color#FFFFFF
save_alpha_separatelyfalse
apng_fps10
apng_loops0
enable_metadatatrue
title
project
description
creator
copyright
keywords
custom_metadata{}
auto_extract_generation_paramstrue
include_node_detailsfalse
save_embeddedtrue
save_workflow_as_jsonfalse
save_xmptrue
save_txttrue
save_dbfalse
save_individual_discoveryfalse
debug_loggingfalse
embed_workflowtrue
a1111_compat_modefalse

ComfyUI's default Save Image already embeds the workflow, which is honestly enough for most people. Save Image with Metadata (Simple) is for when "most people" isn't you - when you want the prompts, sampler, model, and your own title/keywords/description written into the file, plus an XMP sidecar and a human-readable text file, all without wiring up a dozen nodes. The "Simple" is the promise: replace your Save Image node, and the pack's metadata machinery does the rest automatically.

The required inputs are minimal: images (the IMAGE tensor), filename_prefix (supports tokens like %date:yyyy-MM-dd%), and file_format - PNG, JPG, WebP, TIFF, or APNG. From there, the optional section splits into three groups. File naming: include_project, include_datetime, custom_output_directory with output_path_mode (absolute vs. subfolder), and filename_format (padded zeros or simple). Image quality: quality_preset, color_profile (embed an ICC profile - sRGB variants, Adobe RGB, ProPhoto - or none), rendering_intent, bit_depth (16-bit works for PNG only), alpha_mode (auto/premultiplied/straight/matte with matte_color), and APNG timing. Metadata: the master enable_metadata switch, the descriptive fields (title, description, creator, copyright, keywords), custom_metadata as a JSON string for your own fields, and the four write targets - save_embedded, save_workflow_as_json, save_xmp, save_txt - plus save_db if you've configured the database handler.

The two killer defaults are auto_extract_generation_params and embed_workflow, both on by default. The first walks your graph, finds the checkpoint, prompt, sampler, CFG, seed, and LoRAs, and writes them into the metadata structure (that's what the pack's Query node reads back with ai_info.generation.model and friends). The second embeds the workflow JSON in PNGs for drag-back reloading. And there's a genuinely thoughtful extra: a1111_compat_mode, which embeds an Automatic1111-style parameter string in the PNG text chunk - so images you save here are legible to A1111-style tools and the pack's own query node can read theirs.

Outputs are images (pass-through, so you can chain to another node) and filepath (STRING - the full path, ready to hand to the pack's Query or Debugger nodes).

Honest caveats: "16-bit" only applies to PNG; XMP sidecars and text files mean one image can leave behind three files, which is a feature for cataloging and a nuisance otherwise - flip save_txt off if you don't want the clutter. And the auto-extraction reads the workflow graph, so exotic custom-node setups may not be fully captured. It's a single-author, niche pack - but this is its most everyday-useful node.

Install the pack and restart:

cd ComfyUI/custom_nodes
git clone https://github.com/EricRollei/AAA_Metadata_System
cd AAA_Metadata_System
pip install -r requirements.txt

Find it under Eric's Nodes → Output, drop it where your Save Image sits, and let it do the paperwork.

CategoryEric's Nodes/Output

Inputs (36)

NameTypeDefaultDescription
imagesIMAGEImages to save.
filename_prefixSTRINGComfyUIBase name for saved files. Supports tokens like %date:yyyy-MM-dd%.
file_formatCOMBOpngPrimary image format.
include_projectoptBOOLEANfalseAppend project name to filename.
include_datetimeoptBOOLEANtrueAppend timestamp to filename.
custom_output_directoryoptSTRINGOverride output folder. Relative paths stay under ComfyUI/output.
output_path_modeoptCOMBOSubfolder in OutputTreat custom directory as absolute or relative to the output folder.
filename_formatoptCOMBODefault (padded zeros)Choose sequential filename style.
quality_presetoptCOMBOBest QualityAdjust compression vs. quality for supported formats.
color_profileoptCOMBOsRGB v4 AppearanceEmbedded ICC profile.
rendering_intentoptCOMBORelative ColorimetricRendering intent used for color conversions.
bit_depthoptCOMBO8-bit16-bit currently applies to PNG only.
alpha_modeoptCOMBOautoHow to treat alpha when the format lacks transparency.
matte_coloroptSTRING#FFFFFFBackground colour for matte mode (name or #RRGGBB).
save_alpha_separatelyoptBOOLEANfalseWrite a separate alpha image for formats without transparency support.
apng_fpsoptINT101–60Frames per second for APNG output.
apng_loopsoptINT00–99999Loop count for APNG (0 means infinite).
enable_metadataoptBOOLEANtrueMaster switch for writing structured metadata.
titleoptSTRINGImage title.
projectoptSTRINGProject or collection name.
descriptionoptSTRINGImage description or caption.
creatoroptSTRINGCreator/artist name.
copyrightoptSTRINGCopyright / rights notice.
keywordsoptSTRINGComma-separated keyword list.
custom_metadataoptSTRING{}Custom metadata JSON merged into the output structure.
auto_extract_generation_paramsoptBOOLEANtruePull prompts, sampler settings, etc. from the workflow automatically.
include_node_detailsoptBOOLEANfalseInclude node IDs and wiring details for debugging.
save_embeddedoptBOOLEANtrueWrite structured metadata directly into the image when possible.
save_workflow_as_jsonoptBOOLEANfalseExport the workflow alongside the image as JSON.
save_xmpoptBOOLEANtrueCreate an XMP sidecar file.
save_txtoptBOOLEANtrueCreate a human-readable text summary.
save_dboptBOOLEANfalseSend metadata to the configured database handler, if any.
save_individual_discoveryoptBOOLEANfalsePersist per-run workflow discovery reports in addition to the central log.
debug_loggingoptBOOLEANfalseVerbose console logging for troubleshooting.
embed_workflowoptBOOLEANtrueEmbed ComfyUI workflow data in PNG files for easy reloading.
a1111_compat_modeoptBOOLEANfalseEmbed Automatic1111-compatible parameter strings in PNG text and JPEG comments.

Outputs (2)

NameTypeDescription
imagesIMAGE
filepathSTRING