Path → Image (+RGBA/Mask/Meta)
Load an image from an arbitrary path, with RGBA, mask and metadata
- image
- image_rgba
- mask
- mask_image
- json
- metadata
- width
- height
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 asIMAGE.image_rgba- RGBA asIMAGE(alpha channel preserved).mask-MASKderived from alpha (all-ones if the image has no alpha).mask_image- the same mask as a 3-channelIMAGE.json,metadata-STRINGmetadata dumps.width,height-INTdimensions.
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.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| path | STRING | — |
Outputs (8)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| image_rgba | IMAGE | — |
| mask | MASK | — |
| mask_image | IMAGE | — |
| json | STRING | — |
| metadata | STRING | — |
| width | INT | — |
| height | INT | — |