Nodes/DemonAlone-nodes-ComfyUI/Load Image With Metadata
ComfyUI Node

Load Image With Metadata

Get the workflow data back out of a PNG, and load it right-side up

By DemonAlone·Created 7 months ago·Updated 22 days ago· 3
Load Image With Metadata
    • image
    • mask
    • Metadata RAW
    • Metadata Clean
    image

    ComfyUI's "workflow included" culture is real - a PNG generated in ComfyUI carries the whole graph embedded in its metadata, drag it back in and the pipeline reconstructs itself. This node exists because sometimes you don't want the whole workflow back, you want just the generation parameters, and the stock Load Image node doesn't give you a clean way to pull that out. It's the author's own port of CImageLoadWithMetaData from ComfyUI-Crystools.

    What it does

    The single input is image - the standard file picker over whatever's in your ComfyUI input folder. What you get back is more interesting than a normal loader: alongside the usual image tensor and mask (the alpha channel, if the source has one), it also applies EXIF orientation correction before handing you the pixels - so a photo whose rotation lives in EXIF metadata rather than baked into the pixel data loads right-side up instead of sideways, which is a real trap with a plain loader on phone or camera photos.

    Then there's the actual point of the node: two metadata outputs. Metadata RAW is the full, unfiltered metadata blob as ComfyUI or whatever tool wrote the file stored it. Metadata Clean is a trimmed version containing only the essential generation parameters - the useful stuff (prompt, sampler settings, seed) without everything else that tends to ride along in a full workflow dump. Both come out as their own custom types rather than plain text, so they're built to feed further nodes that understand them - if you just want to eyeball what's inside, route them into a node that can display arbitrary data rather than expecting a straight wire into a text box.

    One more thing worth knowing: this node is flagged as an output node internally, meaning ComfyUI will execute it on queue even if nothing downstream is connected - it's not purely a pass-through utility, it behaves a bit like a Preview/Save node in that respect.

    Installing it

    ComfyUI Manager: search DemonAlone-nodes-ComfyUI, install, restart. Manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/DemonAlone/SimpeStringGenerator_ComfyUI
    

    No extra dependencies or downloads beyond core ComfyUI.

    Where people get burned

    If your images load sideways with the stock Load Image node but come in correctly here, that's the EXIF orientation handling doing its job - it's the actual reason to reach for this node over the built-in one when you're loading real-world photos rather than pure ComfyUI output.

    The dropdown only shows files already sitting in ComfyUI's input folder - upload through the UI or drop the file in manually first, same as any loader node. And don't expect the two metadata outputs to be readable as-is if you route them somewhere expecting plain text; they're typed for a reason, and printing them cleanly means finding (or building) a node on the other end that knows what to do with METADATA_RAW / METADATA_CLEAN.

    CategoryImage

    Inputs (1)

    NameTypeDefaultDescription
    imageCOMBO1 options: example.png

    Outputs (4)

    NameTypeDescription
    imageIMAGE
    maskMASK
    Metadata RAWMETADATA_RAW
    Metadata CleanMETADATA_CLEAN