Load Image (Path) (Legacy)
Load an image from anywhere, not just the input folder
- IMAGE
- MASK
- MASK_INVERTED
ComfyUI's built-in Load Image only looks inside its input folder. That's fine until your edit pipeline needs the photo that lives in D:\projects\session7\raw\scene_04.png - the one your editor is actively exporting to. This node is the "load from a real path" escape hatch: type any absolute or relative path, Windows or Unix style, spaces included, and it loads the file with proper alpha handling.
How it works
The path input is normalized the way you'd hope - backslashes and forward slashes both work, leading/trailing whitespace is stripped, relative paths resolve to absolute against ComfyUI's working directory, and internal spaces are preserved. It validates that the file exists before running (you get a clear "Invalid image file" error otherwise, not a silent blank).
It loads through PIL with EXIF rotation applied (so phone photos aren't sideways), handles 16-bit grayscale correctly (divides by 65535 instead of 255), and stacks multiple frames if the file has them - animated GIF/WebP pages come out as a batch, MPO stereo photos use the first frame. Crucially, it hashes the file content for its change-detection, so if you re-save the image on disk and re-run, ComfyUI knows the input changed and actually re-loads it instead of serving a stale cached result.
The three outputs:
- IMAGE - the RGB tensor.
- MASK - extracted from the alpha channel, in ComfyUI's convention (transparent areas are white). For images with no alpha you get a full-sized zero mask - the source is explicit that it doesn't hand back the tiny 64×64 stub some loaders return.
- MASK_INVERTED - the flipped version, i.e. the alpha itself.
Why you'll reach for it
The typical case is image-to-image editing: you export a frame from a video tool or an editor, run it through a Klein/Flux-style edit, and want the raw source loaded and its alpha as a mask. Two birds: the IMAGE goes to the edit encoder, the MASK can drive an inpaint region or a composite. The file-hash caching also makes it the right node for looped/agentic workflows where a file on disk changes between runs and you need the graph to notice.
Where people get burned
- Relative paths resolve from ComfyUI's working directory, not from your
inputfolder. When in doubt, use absolute paths - that's what this node is for. - The mask is transparent-as-white, matching core ComfyUI's Load Image, not "white = keep." Flip with MASK_INVERTED if your downstream node expects the opposite.
- It loads the first frame of MPO files by design; for animated formats you get a batch, and frames with mismatched dimensions are skipped.
Installing it
Ships in silveroxides/ComfyUI-UtilsCollection. ComfyUI Manager: search ComfyUI-UtilsCollection, install, restart. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/silveroxides/ComfyUI-UtilsCollection
cd ComfyUI-UtilsCollection
pip install -r requirements.txt # opencv-python, typing-extensions
Restart and it's there. No models to download - the pack's only real dependency is OpenCV, which the Manager install handles. This is the legacy alias (SU_LoadImagePath) of canonical UC_LoadImagePath; identical behavior, the old name just keeps older workflow JSONs loading.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| image_path | STRING | Path to the image file. Supports absolute or relative paths with any OS format (backslashes or forward slashes). Whitespaces in paths are supported. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| MASK | MASK | — |
| MASK_INVERTED | MASK | — |