Nodes/AAA Metadata System/Save Image with Metadata v099d
ComfyUI Node

Save Image with Metadata v099d

PSD Layers, 16-bit PNG, ICC Profiles, and Every Metadata Format

By EricRollei·Created 10 months ago·Updated 9 months ago· 13
Save Image with Metadata v099d
  • images
  • mask_layer_1
  • mask_layer_2
  • overlay_layer_1
  • overlay_layer_2
  • images
  • filepath
filename_prefixComfyUI
file_formatpng
include_projectfalse
include_datetimetrue
mask_1_nameMask 1
mask_1_blend_modenormal
mask_1_opacity255
mask_2_nameMask 2
mask_2_blend_modenormal
mask_2_opacity255
_divider_mask_section--- Mask Layer Options ---
include_mask_layersfalse
overlay_1_nameOverlay 1
overlay_1_blend_modenormal
overlay_1_opacity255
overlay_2_nameOverlay 2
overlay_2_blend_modenormal
overlay_2_opacity255
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
additional_formatNone
additional_format_qualityBalanced
additional_format_suffix_web
additional_format_embed_workflowfalse
additional_format_color_profilesRGB v4 Appearance
svg_colormodecolor
svg_hierarchicalstacked
svg_modespline
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
enable_runtime_hooksAuto (use config)
embed_workflowtrue

This is the one the pack is named after. Save Image with Metadata v099d is the flagship output node - the older, full-featured sibling of the Simple version - and it's the most powerful image saver you'll find in a custom node, with one very specific personality: it's built for people who hand their ComfyUI output to Adobe software. It saves PNG, JPG, WebP, TIFF, APNG, SVG, and PSD; it writes 16-bit PNGs with ICC color profiles; it can pack your image into a real Photoshop file with named, blended layers; and it can write your metadata everywhere at once - embedded, XMP sidecar, text file, and database.

Start with the essentials: images, filename_prefix (tokens like %date:yyyy-MM-dd%), and file_format with seven choices. Then the file-management group mirrors the Simple node - custom_output_directory/output_path_mode, filename_format, quality_preset, color_profile, rendering_intent, bit_depth (16-bit is PNG-only), alpha_mode/matte_color, APNG fps/loops. The metadata section is the same core: enable_metadata, title/project/description/creator/copyright/keywords, custom_metadata (JSON), auto_extract_generation_params (defaults on - walks your graph for prompts, model, sampler, CFG, seed, LoRAs), include_node_details, and the four write targets (save_embedded, save_workflow_as_json, save_xmp, save_txt, save_db).

Then it diverges with the features Simple doesn't have. PSD layer support: two mask layers (mask_layer_1/mask_layer_2 with names, blend modes, and 0–255 opacity) and two overlay layers (overlay_layer_1/overlay_layer_2, same options), gated by include_mask_layers. Wire a mask or overlay image in, and the PSD you save contains real named layers with blend modes - composable in Photoshop later. A second copy: additional_format saves a web-friendly JPG alongside your master PNG (with additional_format_suffix, quality, and its own color profile). SVG options for the SVG format path: svg_colormode, svg_hierarchical, svg_mode (spline/polygon/none). And enable_runtime_hooks - the pack's most advanced feature: it hooks into node execution to capture what actually ran, which matters in conditional workflows where a static graph scan can't know which branch executed. Auto = read config.json; enabling it the first time may require a ComfyUI restart (or set AAA_METADATA_ENABLE_HOOKS=true).

Outputs are images and filepath - same as Simple, and filepath feeds the pack's Query/Debugger nodes.

Honest guidance: start with the Simple node if you don't need layers. Come here for the specific things only this node does - PSD with real layers, 16-bit PNG, the second-copy feature, and runtime hooks. The trade-offs are real: it's a bigger surface area, some options only apply to certain formats (bit_depth, the SVG trio, APNG settings), and the pack is a one-author effort where docs run ahead of community validation. Set save_txt and XMP off if you don't want three files per image. But for a color-managed, metadata-complete, Adobe-friendly save, there isn't a better node in the ecosystem.

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, try file_format = psd with one overlay layer wired in, and watch it open in Photoshop with the layer intact. That moment sells the pack.

CategoryEric's Nodes/Output

Inputs (62)

NameTypeDefaultDescription
imagesIMAGEThe images to save
filename_prefixSTRINGComfyUIBase name for saved files. Can include formatting like %date:yyyy-MM-dd%
file_formatCOMBOpngImage format to save in
include_projectoptBOOLEANfalseAdd project name to filename
include_datetimeoptBOOLEANtrueAdd date and time to filename
mask_layer_1optIMAGEOptional mask layer 1
mask_1_nameoptSTRINGMask 1Name for mask layer 1
mask_1_blend_modeoptCOMBOnormalBlend mode for mask layer 1
mask_1_opacityoptINT2550–255Opacity for mask layer 1 (0-255)
mask_layer_2optIMAGEOptional mask layer 2
mask_2_nameoptSTRINGMask 2Name for mask layer 2
mask_2_blend_modeoptCOMBOnormalBlend mode for mask layer 2
mask_2_opacityoptINT2550–255Opacity for mask layer 2 (0-255)
_divider_mask_sectionoptSTRING--- Mask Layer Options ---
include_mask_layersoptBOOLEANfalse
overlay_layer_1optIMAGEOptional overlay layer 1
overlay_1_nameoptSTRINGOverlay 1Name for overlay layer 1
overlay_1_blend_modeoptCOMBOnormalBlend mode for overlay layer 1
overlay_1_opacityoptINT2550–255Opacity for overlay layer 1 (0-255)
overlay_layer_2optIMAGEOptional overlay layer 2
overlay_2_nameoptSTRINGOverlay 2Name for overlay layer 2
overlay_2_blend_modeoptCOMBOnormalBlend mode for overlay layer 2
overlay_2_opacityoptINT2550–255Opacity for overlay layer 2 (0-255)
custom_output_directoryoptSTRINGOverride the default output location. For relative paths, don't start with backslash. Use 'images/subfolder' format. Leave empty to use default output folder.
output_path_modeoptCOMBOSubfolder in OutputHow to interpret the custom output directory: as an absolute path, as a subfolder in the standard output folder
filename_formatoptCOMBODefault (padded zeros)How to format sequential filenames: with padded zeros or simple numbers
quality_presetoptCOMBOBest QualityQuality versus file size tradeoff
color_profileoptCOMBOsRGB v4 AppearanceColor profile to embed in the image
rendering_intentoptCOMBORelative ColorimetricHow colors are mapped when converting between color spaces
bit_depthoptCOMBO8-bitSave in 8-bit (standard) or 16-bit (high precision) format. 16-bit only works with PNG.
alpha_modeoptCOMBOautoHow to handle alpha channel. Auto=choose best for format, Matte=composite onto background color
matte_coloroptSTRING#FFFFFFBackground color when saving with matte. Use color name or hex value.
save_alpha_separatelyoptBOOLEANfalseSave alpha channel as separate image for formats that don't support transparency
apng_fpsoptINT101–60Frames per second for animated PNG
apng_loopsoptINT00–99999Number of animation loops (0 = infinite)
additional_formatoptCOMBONoneSave a second copy in this format (e.g., workflow in PNG plus JPG for sharing)
additional_format_qualityoptCOMBOBalancedQuality setting for the additional format
additional_format_suffixoptSTRING_webSuffix for the additional format filename (e.g., image_web.jpg)
additional_format_embed_workflowoptBOOLEANfalseWhether to embed workflow data in the additional format (PNG only)
additional_format_color_profileoptCOMBOsRGB v4 AppearanceColor profile for the additional format
svg_colormodeoptCOMBOcolorSVG color mode (only applies when saving as SVG)
svg_hierarchicaloptCOMBOstackedSVG hierarchy mode (only applies when saving as SVG)
svg_modeoptCOMBOsplineSVG curve mode (only applies when saving as SVG)
enable_metadataoptBOOLEANtrueMaster switch to enable/disable all metadata writing. When disabled, no structured metadata will be written anywhere.
titleoptSTRINGImage title
projectoptSTRINGProject name for organization
descriptionoptSTRINGImage description/caption
creatoroptSTRINGCreator/artist name
copyrightoptSTRINGCopyright information
keywordsoptSTRINGComma-separated keywords/tags
custom_metadataoptSTRING{}Custom metadata in JSON format. Example: {"basic":{"source":"My Collection"},"ai_info":{"generation":{"negative_prompt":"blurry"}},"custom_section":{"custom_field":"value"}}
auto_extract_generation_paramsoptBOOLEANtrueAutomatically extract comprehensive generation parameters (prompts, model, sampler, etc.) from workflow without manual wiring
include_node_detailsoptBOOLEANfalseInclude technical node information (IDs, connections) in metadata - useful for debugging
save_embeddedoptBOOLEANtrueSave structured metadata directly inside the image file (title, description, etc.) - distinct from workflow embedding.
save_workflow_as_jsonoptBOOLEANfalseSave workflow data as a separate JSON file
save_xmpoptBOOLEANtrueSave metadata in XMP sidecar file (.xmp)
save_txtoptBOOLEANtrueSave human-readable metadata in text file (.txt)
save_dboptBOOLEANfalseSave metadata to database (if configured)
save_individual_discoveryoptBOOLEANfalseSave individual discovery JSON and HTML files for each run (central discovery is always maintained)
debug_loggingoptBOOLEANfalseEnable detailed debug logging to console
enable_runtime_hooksoptCOMBOAuto (use config)Enable runtime execution hooks to capture actual node execution data. Auto = use config.json setting. Provides more accurate metadata for conditional workflows. May require ComfyUI restart if enabling for first time.
embed_workflowoptBOOLEANtrueEmbed ComfyUI workflow graph data in the PNG file - enables re-loading workflow later (PNG only)

Outputs (2)

NameTypeDescription
imagesIMAGE
filepathSTRING