Nodes/comfyui-OreX/🖼️ Load Image (OreX)
ComfyUI Node

🖼️ Load Image (OreX)

The same node you know, with the filename on the side

By orex2121·Created about a year ago·Updated 3 days ago· 34
🖼️ Load Image (OreX)
    • image
    • mask
    • filename
    • width
    • height
    image

    Load Image (OreX) looks and behaves like ComfyUI's built-in Load Image - pick a file from your input folder, get an IMAGE tensor and a MASK out - with one addition that changes how you build batch workflows: it also hands you the filename, the width, and the height as plain outputs. That doesn't sound like much until you're trying to save a processed image under the name of the image you loaded, or you need the source dimensions for a ratio calculation. It's the difference between "Load Image + a filename hack" and just having the name.

    How it works

    Mechanically it's the familiar loader: it lists image files from ComfyUI's input directory (with the usual upload widget), opens the file with PIL, applies EXIF orientation, and produces a normalized float tensor. Details the source handles that the core node also handles - multi-frame GIF/animation support (each frame becomes a batch entry) and alpha-channel handling where transparency is converted into a proper mask (inverted, so 1 = fully transparent). The extra outputs come from a couple of lines the core node skips: the basename with extension stripped (filename) and the pixel size of the first frame (width, height).

    Outputs that matter

    • image - the IMAGE tensor, wire it anywhere you'd wire Load Image.
    • mask - the alpha mask (empty/black if the file has no transparency).
    • filename - the file's name without extension, e.g. portrait_v2. This is the one the core node won't give you, and it's the star here: feed it into a Save Image filename field and your outputs keep the source's name automatically.
    • width, height - the source dimensions, handy for driving a Ratio node or an aspect-preserving resize.

    Install

    From ComfyUI Manager (search "comfyui-OreX") or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/orex2121/comfyui-OreX
    

    Restart. Pillow is already a ComfyUI dependency, so nothing extra installs for this node.

    Where people get burned

    The batch loader in this same pack (Load Image Batch) is the one for folder-wide processing; this node loads a single file at a time. If your workflow re-runs with a different image, remember the filename output updates too - that's the feature, but it means a Save Image node fed from here will rename its output to match every new source. And if you're processing layered files, note that frames with mismatched dimensions are skipped (the node only batches frames that share the first frame's size). Most people hit none of this and just enjoy having the name.

    Category🤫OreX/Image

    Inputs (1)

    NameTypeDefaultDescription
    imageCOMBO1 options: example.png

    Outputs (5)

    NameTypeDescription
    imageIMAGE
    maskMASK
    filenameSTRING
    widthINT
    heightINT