Nodes/Prompt Info/Load Image With Info
ComfyUI Node

Load Image With Info

Load Image With Info — the honest way to find out what actually generated that image

By chrisgoringe·Created 3 years ago·Updated 2 years ago· 32
Load Image With Info
    • image
    • mask
    • info
    image

    Every ComfyUI output PNG carries the whole graph that made it, baked into the file metadata. That's the "drag the image back into ComfyUI and the workflow reconstructs" trick that made "workflow included" the culture norm of the scene - you get the full pipeline for free. But sometimes you don't want the full pipeline. You want to know what prompt was used, or which checkpoint, or which LoRA, without loading and staring at a 40-node graph.

    That's exactly what Load Image With Info is for. It's a drop-in replacement for the built-in Load Image node from the cg-prompt-info pack that also hands you the saved workflow data as a string you can actually read.

    How it works

    ComfyUI saves a prompt and a workflow text chunk into the PNG. Load Image With Info reads those chunks with PIL, finds the part that holds the per-node input values, and hands it to you as a third output called info. The value you get is a JSON string - a dictionary keyed by node id, where each entry looks like {"type": "KSampler", "inputs": {...}, "outputs": {...}}.

    Two things worth knowing about what's in there. First, if the image was saved by a plain Save Image node with no extra help, you only get input values that were widgets - the prompt, seed, cfg, and so on. Values that arrived from wires and any node outputs simply aren't in the stored data; ComfyUI never saved them. Second, if the workflow was saved with this pack's Add Info node in the chain, the metadata is enriched with inputs and outputs of every node that ran - which makes this node dramatically more useful. The two are designed to work together.

    The inputs and outputs that matter

    Only one input: image, a file picker exactly like the stock Load Image node.

    • image (IMAGE) - the loaded image, same as core Load Image.
    • mask (MASK) - also identical to core, present because the node inherits from it.
    • info (STRING) - the JSON text of the embedded workflow values. This is the whole point; wire it into Extract Info or Hunt Info from the same pack to actually pull values out of it.

    Install

    No dependencies, no model files, nothing to configure. It's a pure-Python node that only uses ComfyUI's own libraries. Easiest path: ComfyUI Manager, search for "Prompt Info" (the pack's title) and install. Or from a terminal:

    cd ComfyUI/custom_nodes
    git clone https://github.com/chrisgoringe/cg-prompt-info
    

    Then restart ComfyUI. That's the whole install. To update later, git pull inside custom_nodes/cg-prompt-info and restart.

    Common issues

    The big one: the info output comes back as {} - empty JSON. That means the image simply has no embedded workflow data. It happens when the image wasn't saved by ComfyUI at all, or when it passed through something that strips PNG text chunks - many image re-encoders, gallery uploads, and mobile repost pipelines drop them. Nothing you can do at load time recovers that; the data is gone.

    Second gotcha: you get data, but no outputs and no values for wired inputs. That's not a bug - that's how much ComfyUI stores by default. If you need the richer picture, the person generating the image has to run it through Add Info before saving. It can't be retrofitted after the fact.

    The author is Chris Goringe (chrisgoringe on GitHub, Old_System7203 on Reddit), who also makes the popular Use Everywhere and Image Picker packs - a reputable name in the custom-node space, and this one is about as low-risk as a custom node gets: the whole pack is a couple hundred lines of Python you can read in five minutes.

    Categoryprompt_info

    Inputs (1)

    NameTypeDefaultDescription
    imageCOMBO1 options: example.png

    Outputs (3)

    NameTypeDescription
    imageIMAGE
    maskMASK
    infoSTRING