Nodes/ComfyAngel/Load Image + Metadata 🪽
ComfyUI Node

Load Image + Metadata 🪽

Pull the workflow out of any PNG you load

By ThepExcel·Created 8 months ago·Updated about a month ago· 14
Load Image + Metadata 🪽
    • image
    • mask
    • metadata_raw
    • metadata_formatted
    image

    Every PNG that came out of a generator is secretly a text file with an image wrapped around it. ComfyUI embeds the workflow as PNG text chunks, A1111 and Forge stuff a flat parameters string in there, and most people never look at it. Load Image + Metadata 🪽 is the node that opens the file with both hands: it loads the image like ComfyUI's built-in Load Image and hands you the embedded generation metadata as text - so you can parse it, display it, or reproduce it.

    The four outputs

    • image - the loaded image as a normal IMAGE tensor, EXIF orientation fixed, same as you'd get from Load Image.
    • mask - the alpha channel as a MASK (zeros when there's no transparency). Note it's inverted like ComfyUI's LoadImage mask convention: 1.0 means transparent.
    • metadata_raw - the raw metadata string straight out of the file. For A1111/Civitai images that's the parameters chunk; for ComfyUI images it's the prompt JSON.
    • metadata_formatted - the same metadata parsed and prettified into human-readable lines like Model: ... / Seed:12345 | CFG:7.0 | Steps:30 | euler/ancestral.

    The input is the standard image upload picker, so it reads from ComfyUI's input folder like any loader. It also hashes the file to detect changes (IS_CHANGED), so it re-runs when you replace the file rather than caching a stale load.

    How the parsing works

    The node checks the PNG's info dict: a parameters key means the A1111 dialect, a prompt key means the ComfyUI graph JSON. Both get run through the pack's metadata parser, which extracts seed, model, LoRAs, CFG, steps, sampler, scheduler, resolution, denoise, and prompts. If parsing fails, metadata_formatted falls back to the raw text (truncated) or "No metadata found." That fallback matters more than it looks: re-encoded or screenshotted images have no metadata at all - JPEG conversion, hosting recompression, and screenshots all strip the text chunks, which is the number one "why is my metadata empty" cause.

    The natural workflow

    This node is the front end of a three-node chain that's ComfyAngel's signature feature: load with metadata → metadata_raw into a Parameter Parser → parsed values back into the image via Parameter Overlay. Net effect: a baked-in caption of the settings used to make an image, for sharing or comparison. Wire metadata_raw to the parser's input and you have seed, sampler, steps, CFG, and prompts as separate typed outputs.

    Installing it

    cd ComfyUI/custom_nodes
    git clone https://github.com/ThepExcel/ComfyAngel.git
    

    Restart ComfyUI, or search "ComfyAngel" in ComfyUI Manager. The only dependency is Pillow - no model files, nothing heavy.

    Where people get burned: loading a WebP or JPEG and finding no metadata (only PNG carries the full chunks reliably), and loading images you didn't generate yourself - the metadata is whatever was embedded, so if the author stripped it, it's gone for good. That's a metadata law, not a bug.

    CategoryComfyAngel/Loader

    Inputs (1)

    NameTypeDefaultDescription
    imageCOMBO1 options: example.png

    Outputs (4)

    NameTypeDescription
    imageIMAGE
    maskMASK
    metadata_rawSTRING
    metadata_formattedSTRING