ComfyUI Node

MetaMan Load Image

The Load Image node that doesn't throw your generation settings away

By MatthewClayHarrison·Created about a year ago·Updated about a year ago· 2
MetaMan Load Image
    • image
    • metadata_json
    image

    You know this moment: you find an image you love - on Civitai, in a Discord, in your own output folder - and you want to know exactly how it was made. The seed and settings are technically sitting inside the PNG file. The problem is ComfyUI's built-in Load Image hands you a tensor and quietly throws the text chunks in the trash. MetaManLoadImage is the version that keeps them, which makes it the front door of the whole MetaMan pack.

    What it actually does

    It's a drop-in replacement for Load Image with one extra job: read the image and dig every bit of embedded generation metadata out of the file, then hand you both. The image tensor goes wherever you'd normally send it. The metadata comes out as a JSON string that you feed to the other two nodes in this pack - MetaManExtractComponents to split it into usable settings, or MetaManEmbedAndSave to re-encode it for another platform.

    This scratches a real itch. The seed is in PNG metadata, but nobody wants to open each file to read it, and the moment you crop or export, it's gone. Pulling it out into the graph where you can actually use it is the whole point of the pack.

    How it works

    Under the hood it opens the file with Pillow and reads the PNG text chunks, then parses whatever it recognizes:

    • parameters - the classic A1111/Civitai chunk. It splits the prompt, Negative prompt:, and the parameter line (Steps:, CFG scale:, Seed:, Size:, Model:, ...) into a structured dict.
    • workflow / prompt - ComfyUI's embedded JSON. Instead of matching one fixed template, it scans the node graph and pulls sampling parameters out of whatever nodes are there, core or custom. That's the "universal" bit and it's more robust than you'd expect for a pack this small.
    • generation_data - Tensor.AI's format, stored raw.
    • meta - MetaMan's own universal JSON chunk.

    Everything - file path, dimensions, format, and the parsed metadata - gets wrapped into one JSON string, so downstream nodes never have to touch the file again.

    Inputs and outputs that matter

    There's exactly one input: image, a dropdown of the files in ComfyUI/input with an upload button, just like stock Load Image. Two outputs:

    • image (IMAGE) - the tensor, ready to wire into your pipeline.
    • metadata_json (STRING) - the whole extraction result as JSON text.

    That string is the interesting part. Wire it straight into MetaManExtractComponents (it's forceInput, so you can't type into it - connecting is the only option).

    Installing it

    Standard custom-node fare, same as any pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/MatthewClayHarrison/ComfyUI-MetaMan
    # restart ComfyUI; or skip all this and use ComfyUI Manager, searching "MetaMan"
    

    No model downloads, no GPU bloat. The real requirements.txt is just Pillow, torch, python-dateutil and piexif - every one of them already in your ComfyUI environment. Restart and the nodes appear under the MetaMan category.

    Gotchas

    • The README is a vision doc, not a spec. It advertises a monolithic "MetaMan Universal" node with an operation dropdown, YAML templates, API integrations - none of that ships. What actually installs is these three nodes in one ~1,600-line file. Don't go hunting for the Universal node; it doesn't exist.
    • No metadata, no drama. An image with empty text chunks still returns a valid metadata_json; the metadata dict is just empty, and whatever you pipe it into falls back to defaults.
    • RGB only. The image gets converted to RGB on the way to a tensor, so a PNG with an alpha channel loses its transparency. Irrelevant for generated photos, annoying if you're loading assets.
    CategoryMetaMan

    Inputs (1)

    NameTypeDefaultDescription
    imageCOMBO1 options: example.png

    Outputs (2)

    NameTypeDescription
    imageIMAGE
    metadata_jsonSTRING