load IMAGE from file (RGB)
Load an image from any path — not just the input dropdown
- image
- exists
Basic data handling: PathLoadImageRGB ("load IMAGE from file (RGB)") is the node that finally lets you load an image from anywhere on disk, not just ComfyUI's input folder. Core ComfyUI's Load Image node only shows you files sitting in ComfyUI/input (that dropdown is generated from that folder). This node takes an absolute or relative path as text and loads it. PNG, JPEG, WebP - if Pillow can read it, this loads it.
That one difference unlocks the batch workflows this pack is built for. Point PathGlob at a folder of reference images anywhere on your drive, feed each matched path into this loader, and suddenly you're batch-processing files you never had to copy into the input directory. The author of this pack clearly works that way - they publish mass-generated sample datasets, and the whole Path section reads like the toolkit of someone who processes hundreds of images per session without dragging them in by hand.
How it works
The node uses Pillow to open the file, calls exif_transpose (so phone/DSLR photos aren't sideways from EXIF orientation), converts to RGB (dropping any alpha channel - that's the "RGB" in the name), and converts to a ComfyUI image tensor scaled to 0–1. Two implementation details worth knowing:
- Missing file? No crash. If the path doesn't exist or can't be decoded, it returns a 1×1 empty tensor and sets the
existsoutput toFalse. Gate downstream nodes on that flag and your workflow degrades gracefully instead of dying. - It re-runs when the file changes. The node overrides
IS_CHANGEDwith the file's modification time, so if you overwrite the source image and re-run, you get the new content - not a cached stale frame. That's a genuinely thoughtful touch for iterative workflows.
Inputs and outputs
- path (STRING, default
"") - where the image lives. Absolute is safest; relative resolves against ComfyUI's cwd. - image (IMAGE) - the loaded tensor, RGB, ready for any image input.
- exists (BOOLEAN) -
Trueif the file loaded,Falseif it was missing or unreadable.
Installing it
Ships in Basic data handling, which has no extra dependencies - it uses Pillow, numpy, and torch, all already present in any working ComfyUI install. ComfyUI Manager → search "Basic data handling" → install → restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/StableLlama/ComfyUI-basic_data_handling
Restart after. No models to download.
Gotchas
The exists flag is your friend - build the habit of wiring it into a conditional for anything that isn't a hard guarantee. And remember it's RGB-only: if you need the alpha channel as a mask, use the pack's RGBA loader instead of this one. Also, the empty 1×1 tensor it returns on failure will happily propagate through the graph and produce garbage, which is why gating matters. If your pipeline only ever loads known-good files, you can ignore all that and just enjoy loading from absolute paths - which is the feature that makes this pack worth installing.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| path | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| exists | BOOLEAN | — |