Nodes/milan-nodes-comfyui/Load One Image with Name, Title, Description
ComfyUI Node

Load One Image with Name, Title, Description

Load Image, Plus the Filename, Title, and Description Nobody Else Hands You

By matorzhin·Created about a year ago·Updated about a year ago· 2
Load One Image with Name, Title, Description
    • IMAGE
    • MASK
    • filename
    • title
    • description
    image

    The stock Load Image, with the receipts attached

    ComfyUI's built-in Load Image gives you exactly two things: pixels and an alpha mask. If you also need to know which file you loaded, or want the title and description written into the image's metadata, you're stuck re-deriving them with extra nodes - or just eyeballing the filename on the node. LoadOneImageExtended, from the milan-nodes-comfyui pack, is a drop-in swap: same picker, same preview, same IMAGE output, plus a filename string and any title/description stored in the file's EXIF or PNG text chunks.

    That matters more than it sounds. If you're batch-redrawing images whose original prompt is embedded in their metadata, or assembling a small dataset/captioning pipeline, having title and description as first-class STRING outputs means you can route them straight into a prompt node or a save node with no extraction step in between.

    How it works

    The node opens the image with Pillow and pokes at two metadata stores:

    • EXIF: XP tags plus standard fields like ImageDescription (tag 270) and the 40091/40092 vendor tags for title/description.
    • PNG text chunks: Title/Subject become the title; Description/comment become the description.

    Whatever it finds comes out as a plain string, and files with no metadata just give you "" - no crash. It also mirrors core Load Image's preprocessing: EXIF orientation is transposed out, the image is converted to RGB, and any alpha channel becomes a mask (1 minus alpha, so transparent areas are white). Animated images are expanded into a frame batch, which the stock node won't do the same way.

    Inputs and outputs

    One required input, image: a dropdown listing the files in ComfyUI's input folder, with an upload button. Because it uses ComfyUI's annotated-path handling (a convention WAS Node Suite popularized), you can also reach files outside that folder by typing something like myfile.png [output] to point at the output folder.

    • IMAGE and MASK - what you'd expect from Load Image; the mask comes from transparency.
    • filename - the name without its extension.
    • title / description - the metadata, or empty strings when there is none.

    Installing it

    Same pack as its sibling node:

    cd ComfyUI/custom_nodes
    git clone https://github.com/matorzhin/milan-nodes-comfyui
    

    then restart, or search "milan-nodes-comfyui" in ComfyUI Manager. Zero extra pip dependencies - it runs on Pillow, torch, and numpy that ComfyUI already bundles.

    Where people get burned

    • The README is stale. It lists only IMAGE plus the three strings and omits the MASK output, but the shipped code returns one. Wire by the node, not by the docs.
    • Empty metadata is an empty string. title and description come back as "" when a file has none, so don't concatenate them into a prompt unconditionally without a fallback.
    • The dropdown only lists ComfyUI's input folder. Files elsewhere need the [output]/[temp] annotated syntax; there's no system file browser.

    It's a small node for a small job. But if you've ever wanted the filename and its metadata in your pipeline, this is the cleanest way to get them.

    Categoryimage

    Inputs (1)

    NameTypeDefaultDescription
    imageCOMBO1 options: example.png

    Outputs (5)

    NameTypeDescription
    IMAGEIMAGE
    MASKMASK
    filenameSTRING
    titleSTRING
    descriptionSTRING