Metadata Consolidator V2
Make your PNGs self-describing, workflow included
- image
- image
- summary
ComfyUI already buries the workflow in the PNG - that's why you can drag an image onto the canvas and recover the whole graph. But that embedded blob is only useful inside ComfyUI. If you want the prompt, model, seed and settings to survive in a form Photoshop, Lightroom or a script can actually read, you need real metadata. That's the job here.
Metadata Consolidator V2 pulls the generation info out of a PNG, merges it with whatever metadata already exists, and writes the combined result to the industry-standard places: an XMP sidecar, embedded EXIF/XMP in the file itself, and a human-readable text file. It's from Eric Hiss's AAA Metadata System pack, which is basically his "make AI images behave like pro photography files" toolkit. If you ship images to clients, catalog a big archive, or just hate losing the seed when someone re-saves a PNG, this is the node you wire in before Save Image.
How it works
You hand it the image tensor (it passes it straight through) and the path to the PNG on disk via input_filepath. It then runs the pack's MetadataService in three steps:
- Read existing metadata - embedded in the file first, with a fallback to the XMP sidecar if there's nothing inside.
- Extract the workflow from the PNG's tEXt chunk (that's where ComfyUI keeps it) and convert it into the pack's structured
ai_info.generationschema - model, prompt, negative prompt, sampler, steps, cfg, seed, size, LoRAs. - Merge and write. If
overwrite_existingis off (the default), existing values win and workflow data fills only the gaps. Flip it on and the workflow stomps everything. Output goes to whichever targets you've enabled.
The two outputs are the same image you put in and a summary string describing what got consolidated - handy for a debug print or a Show Text node.
The inputs that matter
input_filepath- required for it to do anything; leave blank and it politely returns "No filepath provided."overwrite_existing- the merge rule. Leave off unless you want the embedded workflow to be the source of truth.- The write toggles:
write_to_xmp,embed_metadata, andwrite_text_fileare all on by default.write_to_databaseis off - that's for the pack's optional SQLite catalog, skip it unless you're building one.
One thing worth knowing: the deep embedded-metadata features lean on optional dependencies (PyExiv2, and ExifTool for extra formats) that the README tells you to install separately because they're platform-specific. The node works without them, but you'll get the most complete XMP output with PyExiv2 present.
Installing it
You're installing the whole AAA Metadata System pack, not just this node:
cd ComfyUI/custom_nodes
git clone https://github.com/EricRollei/AAA_Metadata_System.git
cd AAA_Metadata_System
pip install -r requirements.txt
Then restart ComfyUI. ComfyUI Manager users: search for "AAA Metadata System" and install from there. No model files are needed. Heads-up on the license: it's CC BY-NC for non-commercial use; commercial use needs a paid license from the author (Eric Hiss, [email protected]). Check the README before you use it in client work.
Troubleshooting
- "No filepath provided" / "File does not exist" - it needs a real absolute path to a PNG on disk; a tensor alone isn't enough.
- Nothing lands in the file - confirm the write toggles are on, and check the console with
debug_loggingon; the node prints its consolidation steps there. - Existing metadata keeps winning - that's the merge policy doing its job. Turn on
overwrite_existingif you actually want the workflow data to override.
It's a fiddly niche, and most people don't need their PNGs to be Adobe-ready. But if you're one of the ones who does, this is the smoothest path from "ComfyUI workflow blob" to "file a catalog software can read."
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| input_filepath | STRING | — | |
| extract_workflow | BOOLEAN | true | — |
| overwrite_existing | BOOLEAN | false | — |
| write_to_xmpopt | BOOLEAN | true | — |
| embed_metadataopt | BOOLEAN | true | — |
| write_text_fileopt | BOOLEAN | true | — |
| write_to_databaseopt | BOOLEAN | false | — |
| debug_loggingopt | BOOLEAN | true | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| summary | STRING | — |