Nodes/comfyui-flipflopnodes/FF Load Image with Metadata
ComfyUI Node

FF Load Image with Metadata

Load an image from any path and get its generation settings back

By fredhopp·Created about a year ago·Updated 12 months ago· 0
FF Load Image with Metadata
    • image
    • mask
    • prompt
    • Metadata RAW
    filepath

    ComfyUI's built-in Load Image only lets you pick from your ComfyUI/input folder. Which is fine until the image you need is somewhere else - a folder another tool wrote to, a download, a network share - and then you're copying files around like it's 2010. FF Load Image with Metadata takes a plain absolute filepath instead, so it loads from anywhere on disk. And it has a second trick the core node doesn't: it reads the generation metadata out of the file, so you can see exactly what produced that PNG. It's the pack's nod to Crystools (the source even credits comfyui-crystools), reworked into the FlipFlop style.

    What comes out

    Four outputs, and each one earns its keep:

    • image - the standard 0–1 float tensor ([1, H, W, 3]), ready to feed a VAE encode, an img2img pipeline, or a ControlNet. Phone photos get EXIF orientation applied first, so sideways shots come out right.
    • mask - if the file has an alpha channel you get 1 - alpha as the mask (transparent regions become 1, matching ComfyUI's inpainting convention). No alpha? You get a zero mask. So a transparent PNG drops in already inpaint-ready.
    • prompt - for a PNG saved by ComfyUI with metadata embedded, this is the JSON "prompt" chunk: the actual graph settings that made the image, the same data that lets you drag a PNG back onto the canvas and rebuild the whole workflow. Wire this into a JSON viewer or a text node to read it.
    • Metadata RAW - the full dump as a METADATA_RAW dictionary: file info (filename, resolution, modified date, size), the embedded workflow JSON if present, plus every EXIF tag and IFD block for JPEGs, GPS included. Heads up: most values get coerced to strings, so treat it as a dictionary to read rather than a typed structure.

    That last output is what makes this node more than a path-loader. If you're chasing the "workflow included" culture of r/comfyui - where sharing the image is sharing the workflow - this is the fastest way to pull that data back out of a file someone posted.

    The one input

    Just filepath (STRING), and there's the rub: it's a raw text field, not a file browser. You type or paste an absolute path. Default is empty, so nothing happens until you fill it.

    Install

    Same pack, same ritual: ComfyUI Manager (search "comfyui-flipflopnodes" or "FlipFlop") or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/fredhopp/comfyui-flipflopnodes.git
    

    Restart, done. requirements.txt lists pillow, numpy, torch and piexif, but pillow/numpy/torch already ship with ComfyUI and piexif isn't even imported - the code uses PIL's built-in getexif(). So effectively nothing extra to install, and no model files anywhere.

    Where people get burned

    This node fails loudly. It's an output node, and a typo in the path raises FileNotFoundError - the node goes red and the run stops. Double-check the full path, use forward slashes, and paste it rather than typing it by hand.

    Two more expectations to set:

    • Empty prompt is normal - JPEGs and any PNG that was re-saved without its embedded text chunks have no prompt metadata, so the prompt output is an empty dict. Not a bug, just what's in the file.
    • Mask follows the alpha - for a flat opaque PNG the mask is all zeros, which is correct for the "don't touch anything" case. Only transparent pixels get a 1.

    The one genuinely annoying part is the manual path entry; there's no picker, and a path-typo burns a queue run. But if you routinely work with images that live outside the input folder - or you want the embedded settings out of a posted PNG - this is a compact tool that does both with zero extra dependencies. It's a niche pack from a single dev, so don't expect a lively support thread to lean on; the code is short and readable if something surprises you.

    CategoryFlipFlop/IO

    Inputs (1)

    NameTypeDefaultDescription
    filepathSTRING

    Outputs (4)

    NameTypeDescription
    imageIMAGE
    maskMASK
    promptJSON
    Metadata RAWMETADATA_RAW