Nodes/Allma Nodes/Allma Load Image
ComfyUI Node

Allma Load Image

The Load Image that also reads the file's story

By OliveiraNickolas·Created 24 days ago·Updated 21 days ago· 0
Allma Load Image
    • image
    • mask
    • metadata
    image

    A PNG that came out of ComfyUI isn't just pixels - it carries the whole workflow that produced it, buried in text chunks, which is exactly why you can drag an image back onto the canvas and get the graph back. That metadata is gold when you want an LLM to understand an image's history: the original prompt, the model, the LoRAs, the sampler. The stock Load Image throws all of it away. Allma Load Image is the drop-in replacement that reads the file's prompt metadata and hands it to you as plain text, alongside the normal image and mask outputs.

    The outputs

    • image and mask - same as the built-in Load Image. Alpha channels become masks, EXIF orientation is applied, multi-frame files load as batches. Nothing to relearn.
    • metadata - a STRING with the generative history: source, model, positive/negative prompt, LoRAs, sampler.

    The formats it reads are the three you'll actually encounter in the wild: ComfyUI PNGs (it walks the embedded prompt/workflow graph chunks to pull out the values that matter), A1111 PNGs (the flat parameters chunk), and JPEG EXIF on a best-effort basis. An unknown format returns an empty string rather than raising, so it degrades gracefully.

    The node re-reads by file hash, so changing the image on disk triggers a fresh load instead of a cached stale one.

    Do you actually need it?

    Here's the honest part: Allma Generate no longer requires this node. It recovers image metadata on its own by walking the graph back to whichever loader supplied the picture - the stock Load Image included. So the case for this node is narrower: you want the metadata as text in the graph, to read it, log it, feed it somewhere else, or debug what an LLM is about to be told. If you're only building an Allma workflow, the plain Load Image is fine and this is optional.

    The deeper point, from the KB's metadata doc: an image is only as good as the file it lives in. If the PNG went through a host that re-encoded it - Reddit, most CDNs, any format conversion - the chunks are gone and no loader can conjure them back. This node reads what's there; it can't recover what was stripped.

    Install

    cd ComfyUI/custom_nodes
    git clone https://github.com/OliveiraNickolas/AllmaNodes
    

    Restart, no pip install - it uses torch/PIL/numpy, which ComfyUI already ships. It's in the Allma/utils group and needs no backend.

    Two caveats for a pack with no community track record yet: the metadata text is formatted for LLM consumption, so if you're reading it yourself expect a compact block rather than a pretty report; and like any custom loader it's reading chunks with hand-rolled parsing - if you feed it a weird file and get an empty string, that's the graceful-degradation path doing its job, not a bug you need to chase.

    CategoryAllma/utils

    Inputs (1)

    NameTypeDefaultDescription
    imageCOMBO1 options: example.png

    Outputs (3)

    NameTypeDescription
    imageIMAGE
    maskMASK
    metadataSTRING