Nodes/AAA Metadata System/PNG Metadata Extractor V3
ComfyUI Node

PNG Metadata Extractor V3

The 'what was this made with' node you keep needing

By EricRollei·Created 10 months ago·Updated 8 months ago· 13
PNG Metadata Extractor V3
    • metadata
    • json_str
    • summary
    input_filepath
    extraction_modeall
    key_filter
    debug_loggingfalse

    You've got an old PNG, you can't remember what made it, and the filename says nothing. ComfyUI culture is "workflow included" - the entire graph gets embedded right in the PNG - but that only helps if you can pull it back out. PNG Metadata Extractor V3 is the tool for that job: point it at a file and it returns the workflow, the generation parameters, and the full metadata as structured data you can actually use.

    It's the metadata-reading workhorse of the AAA Metadata System pack, and the node you'll reach for whenever you're trying to reverse-engineer an image. The best part is that it doesn't just dump text at you - it hands you a proper DICT of what it found, so you can wire the recovered prompt into a text node or feed the workflow JSON somewhere else.

    How it works

    The node builds on the pack's MetadataService, which knows how to read the standard places ComfyUI and friends stash this stuff: the embedded workflow and prompt fields in the PNG, EXIF/XMP metadata, and sidecar files. It handles the split-workflow case too - some tools store workflow data across multiple metadata fields, and ComfyUI won't drag-drop those back cleanly. The extractor detects a split reference, pulls the full workflow from metadata, and merges it, which is exactly the scenario where other extractors hand you a mangled graph.

    The extraction_mode dropdown decides how much you get: workflow, parameters (prompt, negative, sampler, seed, that family), metadata, or all to grab everything at once.

    Inputs and outputs that matter

    • input_filepath - the absolute path to a PNG. Required, string, no file picker. The one gotcha: this node is not a load-image node, it's a file reader, so you'll be typing paths.
    • extraction_mode - default all; switch to workflow or parameters when you know what you want and want a smaller result.
    • key_filter (optional) - comma-separated keys to filter the result down to, handy when the metadata dict is huge and you only care about seed and model.
    • debug_logging (optional) - turns on verbose console output when things aren't extracting like you expect.

    Outputs: metadata (DICT - wire this into anything that consumes structured JSON), json_str (the same thing as a string, perfect for a ShowText-style node), and summary (a short human-readable recap of what was found).

    Installing it

    It ships in AAA Metadata System by Eric Hiss (GitHub: EricRollei). Use ComfyUI Manager (search "AAA Metadata System") or:

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

    Restart ComfyUI. Nothing special is needed for this node - the core requirements cover it.

    Common issues

    If you get "No valid file provided", the path is wrong or missing - it's a string, so no dropdown to blame, just a typo. If the summary says it extracted a workflow but the JSON looks thin, check key_filter - a leftover filter from a previous run can silently strip everything. And if you're feeding it a PNG saved by a non-ComfyUI tool, don't expect parameters: some save pipelines only embed a workflow, some only a prompt, and the node can only report what's physically in the file. When the metadata is genuinely absent, no node can conjure it.

    CategoryEric's Nodes/Metadata

    Inputs (4)

    NameTypeDefaultDescription
    input_filepathSTRING
    extraction_modeCOMBOall4 options: workflow, parameters, metadata, all
    key_filteroptSTRING
    debug_loggingoptBOOLEANfalse

    Outputs (3)

    NameTypeDescription
    metadataDICT
    json_strSTRING
    summarySTRING