Nodes/ComfyUI_DAO_master/Path → Image (+RGBA/Mask/Meta)
ComfyUI Node

Path → Image (+RGBA/Mask/Meta)

Load an image from an arbitrary path, with RGBA, mask and metadata

By orion4d·Created about a year ago·Updated 12 months ago· 11
Path → Image (+RGBA/Mask/Meta)
    • image
    • image_rgba
    • mask
    • mask_image
    • json
    • metadata
    • width
    • height
    path

    ComfyUI's stock image loader wants files inside its input folder, picked from a dropdown. Path To Image doesn't care: you give it a path - any path - and it loads the image, then hands back a stack of useful outputs: RGB, RGBA, a mask from the alpha channel, a mask-as-image, the file's embedded metadata, and the dimensions. If you're building a workflow that processes images from a location ComfyUI doesn't normally see (a render farm folder, a drop box, output from another tool), this is the loader you want.

    How it works

    The node opens the file with Pillow, converts to RGB, and keeps the alpha channel if the image has one (RGBA/LA modes). The mask output is derived from that alpha channel - white where the image is opaque, black where it's transparent. It also reads the file's metadata: PNG text chunks (like parameters embedded by other tools) and EXIF tags, exposed as two string outputs for downstream use. The json output is structured metadata, and metadata is a human-readable EXIF dump.

    It's deliberately minimal: no built-in preview, no extra processing. Just load, convert, and expose everything. That restraint is a feature - you pipe the outputs where you need them and nothing happens behind your back.

    Inputs and outputs

    One input: path (a STRING, no dropdown - type or wire it in). Outputs:

    • image - RGB as IMAGE.
    • image_rgba - RGBA as IMAGE (alpha channel preserved).
    • mask - MASK derived from alpha (all-ones if the image has no alpha).
    • mask_image - the same mask as a 3-channel IMAGE.
    • json, metadata - STRING metadata dumps.
    • width, height - INT dimensions.

    The mask output is the sleeper hit: load a transparent PNG and you get a ready-to-use mask for compositing or inpainting without touching a mask editor.

    How to install

    Part of the orion4d/ComfyUI_DAO_master pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/orion4d/ComfyUI_DAO_master.git
    pip install -r requirements.txt
    

    Restart ComfyUI. Pillow ships with ComfyUI, so this node has effectively no extra dependencies. No models.

    Common issues

    The usual failure is a bad path - absolute paths work, but remember this is a string input, so a typo or a Windows path with escaped backslashes will fail with a file error rather than an empty load. If your mask output is all-white, the image genuinely has no alpha channel; that's correct behavior, not a bug. And for batch looping, pair this with Folder File Pro (same pack) - the two were clearly designed to work together.

    CategoryDAO_master/Images/IO

    Inputs (1)

    NameTypeDefaultDescription
    pathSTRING

    Outputs (8)

    NameTypeDescription
    imageIMAGE
    image_rgbaIMAGE
    maskMASK
    mask_imageIMAGE
    jsonSTRING
    metadataSTRING
    widthINT
    heightINT