Save Image with Metadata (Simple)
Save Image With Metadata Without Setting Up a Single Thing
- images
- images
- filepath
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.
Inputs (36)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | Images to save. | |
| filename_prefix | STRING | ComfyUI | Base name for saved files. Supports tokens like %date:yyyy-MM-dd%. |
| file_format | COMBO | png | Primary image format. |
| include_projectopt | BOOLEAN | false | Append project name to filename. |
| include_datetimeopt | BOOLEAN | true | Append timestamp to filename. |
| custom_output_directoryopt | STRING | Override output folder. Relative paths stay under ComfyUI/output. | |
| output_path_modeopt | COMBO | Subfolder in Output | Treat custom directory as absolute or relative to the output folder. |
| filename_formatopt | COMBO | Default (padded zeros) | Choose sequential filename style. |
| quality_presetopt | COMBO | Best Quality | Adjust compression vs. quality for supported formats. |
| color_profileopt | COMBO | sRGB v4 Appearance | Embedded ICC profile. |
| rendering_intentopt | COMBO | Relative Colorimetric | Rendering intent used for color conversions. |
| bit_depthopt | COMBO | 8-bit | 16-bit currently applies to PNG only. |
| alpha_modeopt | COMBO | auto | How to treat alpha when the format lacks transparency. |
| matte_coloropt | STRING | #FFFFFF | Background colour for matte mode (name or #RRGGBB). |
| save_alpha_separatelyopt | BOOLEAN | false | Write a separate alpha image for formats without transparency support. |
| apng_fpsopt | INT | 101–60 | Frames per second for APNG output. |
| apng_loopsopt | INT | 00–99999 | Loop count for APNG (0 means infinite). |
| enable_metadataopt | BOOLEAN | true | Master switch for writing structured metadata. |
| titleopt | STRING | Image title. | |
| projectopt | STRING | Project or collection name. | |
| descriptionopt | STRING | Image description or caption. | |
| creatoropt | STRING | Creator/artist name. | |
| copyrightopt | STRING | Copyright / rights notice. | |
| keywordsopt | STRING | Comma-separated keyword list. | |
| custom_metadataopt | STRING | {} | Custom metadata JSON merged into the output structure. |
| auto_extract_generation_paramsopt | BOOLEAN | true | Pull prompts, sampler settings, etc. from the workflow automatically. |
| include_node_detailsopt | BOOLEAN | false | Include node IDs and wiring details for debugging. |
| save_embeddedopt | BOOLEAN | true | Write structured metadata directly into the image when possible. |
| save_workflow_as_jsonopt | BOOLEAN | false | Export the workflow alongside the image as JSON. |
| save_xmpopt | BOOLEAN | true | Create an XMP sidecar file. |
| save_txtopt | BOOLEAN | true | Create a human-readable text summary. |
| save_dbopt | BOOLEAN | false | Send metadata to the configured database handler, if any. |
| save_individual_discoveryopt | BOOLEAN | false | Persist per-run workflow discovery reports in addition to the central log. |
| debug_loggingopt | BOOLEAN | false | Verbose console logging for troubleshooting. |
| embed_workflowopt | BOOLEAN | true | Embed ComfyUI workflow data in PNG files for easy reloading. |
| a1111_compat_modeopt | BOOLEAN | false | Embed Automatic1111-compatible parameter strings in PNG text and JPEG comments. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| filepath | STRING | — |