Save Image with Metadata v099d
PSD Layers, 16-bit PNG, ICC Profiles, and Every Metadata Format
- images
- mask_layer_1
- mask_layer_2
- overlay_layer_1
- overlay_layer_2
- images
- filepath
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.
Inputs (62)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | The images to save | |
| filename_prefix | STRING | ComfyUI | Base name for saved files. Can include formatting like %date:yyyy-MM-dd% |
| file_format | COMBO | png | Image format to save in |
| include_projectopt | BOOLEAN | false | Add project name to filename |
| include_datetimeopt | BOOLEAN | true | Add date and time to filename |
| mask_layer_1opt | IMAGE | Optional mask layer 1 | |
| mask_1_nameopt | STRING | Mask 1 | Name for mask layer 1 |
| mask_1_blend_modeopt | COMBO | normal | Blend mode for mask layer 1 |
| mask_1_opacityopt | INT | 2550–255 | Opacity for mask layer 1 (0-255) |
| mask_layer_2opt | IMAGE | Optional mask layer 2 | |
| mask_2_nameopt | STRING | Mask 2 | Name for mask layer 2 |
| mask_2_blend_modeopt | COMBO | normal | Blend mode for mask layer 2 |
| mask_2_opacityopt | INT | 2550–255 | Opacity for mask layer 2 (0-255) |
| _divider_mask_sectionopt | STRING | --- Mask Layer Options --- | — |
| include_mask_layersopt | BOOLEAN | false | — |
| overlay_layer_1opt | IMAGE | Optional overlay layer 1 | |
| overlay_1_nameopt | STRING | Overlay 1 | Name for overlay layer 1 |
| overlay_1_blend_modeopt | COMBO | normal | Blend mode for overlay layer 1 |
| overlay_1_opacityopt | INT | 2550–255 | Opacity for overlay layer 1 (0-255) |
| overlay_layer_2opt | IMAGE | Optional overlay layer 2 | |
| overlay_2_nameopt | STRING | Overlay 2 | Name for overlay layer 2 |
| overlay_2_blend_modeopt | COMBO | normal | Blend mode for overlay layer 2 |
| overlay_2_opacityopt | INT | 2550–255 | Opacity for overlay layer 2 (0-255) |
| custom_output_directoryopt | STRING | Override 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_modeopt | COMBO | Subfolder in Output | How to interpret the custom output directory: as an absolute path, as a subfolder in the standard output folder |
| filename_formatopt | COMBO | Default (padded zeros) | How to format sequential filenames: with padded zeros or simple numbers |
| quality_presetopt | COMBO | Best Quality | Quality versus file size tradeoff |
| color_profileopt | COMBO | sRGB v4 Appearance | Color profile to embed in the image |
| rendering_intentopt | COMBO | Relative Colorimetric | How colors are mapped when converting between color spaces |
| bit_depthopt | COMBO | 8-bit | Save in 8-bit (standard) or 16-bit (high precision) format. 16-bit only works with PNG. |
| alpha_modeopt | COMBO | auto | How to handle alpha channel. Auto=choose best for format, Matte=composite onto background color |
| matte_coloropt | STRING | #FFFFFF | Background color when saving with matte. Use color name or hex value. |
| save_alpha_separatelyopt | BOOLEAN | false | Save alpha channel as separate image for formats that don't support transparency |
| apng_fpsopt | INT | 101–60 | Frames per second for animated PNG |
| apng_loopsopt | INT | 00–99999 | Number of animation loops (0 = infinite) |
| additional_formatopt | COMBO | None | Save a second copy in this format (e.g., workflow in PNG plus JPG for sharing) |
| additional_format_qualityopt | COMBO | Balanced | Quality setting for the additional format |
| additional_format_suffixopt | STRING | _web | Suffix for the additional format filename (e.g., image_web.jpg) |
| additional_format_embed_workflowopt | BOOLEAN | false | Whether to embed workflow data in the additional format (PNG only) |
| additional_format_color_profileopt | COMBO | sRGB v4 Appearance | Color profile for the additional format |
| svg_colormodeopt | COMBO | color | SVG color mode (only applies when saving as SVG) |
| svg_hierarchicalopt | COMBO | stacked | SVG hierarchy mode (only applies when saving as SVG) |
| svg_modeopt | COMBO | spline | SVG curve mode (only applies when saving as SVG) |
| enable_metadataopt | BOOLEAN | true | Master switch to enable/disable all metadata writing. When disabled, no structured metadata will be written anywhere. |
| titleopt | STRING | Image title | |
| projectopt | STRING | Project name for organization | |
| descriptionopt | STRING | Image description/caption | |
| creatoropt | STRING | Creator/artist name | |
| copyrightopt | STRING | Copyright information | |
| keywordsopt | STRING | Comma-separated keywords/tags | |
| custom_metadataopt | STRING | {} | Custom metadata in JSON format. Example: {"basic":{"source":"My Collection"},"ai_info":{"generation":{"negative_prompt":"blurry"}},"custom_section":{"custom_field":"value"}} |
| auto_extract_generation_paramsopt | BOOLEAN | true | Automatically extract comprehensive generation parameters (prompts, model, sampler, etc.) from workflow without manual wiring |
| include_node_detailsopt | BOOLEAN | false | Include technical node information (IDs, connections) in metadata - useful for debugging |
| save_embeddedopt | BOOLEAN | true | Save structured metadata directly inside the image file (title, description, etc.) - distinct from workflow embedding. |
| save_workflow_as_jsonopt | BOOLEAN | false | Save workflow data as a separate JSON file |
| save_xmpopt | BOOLEAN | true | Save metadata in XMP sidecar file (.xmp) |
| save_txtopt | BOOLEAN | true | Save human-readable metadata in text file (.txt) |
| save_dbopt | BOOLEAN | false | Save metadata to database (if configured) |
| save_individual_discoveryopt | BOOLEAN | false | Save individual discovery JSON and HTML files for each run (central discovery is always maintained) |
| debug_loggingopt | BOOLEAN | false | Enable detailed debug logging to console |
| enable_runtime_hooksopt | COMBO | Auto (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_workflowopt | BOOLEAN | true | Embed ComfyUI workflow graph data in the PNG file - enables re-loading workflow later (PNG only) |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| filepath | STRING | — |