ImageLoadByPath(IOHelpers)
Load an image from anywhere on disk — not just the input folder
- IMAGE
- MASK
Core Load Image is a fine node right up until the file you need isn't in ComfyUI/input/. If you're feeding from a watch folder, a network share, an output directory from another script, or anywhere else the input folder can't see, you'll want ImageLoadByPath(IOHelpers). You type the path, you get the image.
That's the whole pitch: the built-in node gives you a dropdown over one folder; this one gives you a string input that resolves to anything the ComfyUI process can read. For automation - a script drops an image, the workflow picks it up, processes it, hands back a result - this is the load node you want.
How it works
The mechanism is plain PIL, which is good news for predictability. The node opens the file with Image.open(file_path), walks all frames if it's an animated image (a GIF comes through as a multi-frame batch, not just the first frame), applies exif_transpose for correct orientation, converts to RGB, and normalizes to the usual 0.0–1.0 float tensor ComfyUI expects. It also computes a mask from the alpha channel if the file has one.
Inputs and outputs
- file_path - the only input. Paste the absolute path to the file.
Outputs:
- IMAGE - wire this into VAE Encode, a sampler's latent input, an upscaler, whatever consumes the image.
- MASK - the alpha-derived mask (
1 − alpha, matching ComfyUI's white-keeps convention). If the source has no alpha channel, this comes back as an empty 64×64 mask, so don't count on it for plain JPEGs.
Installing it
The pack is a single dependency-free file from GitHub user Ryuukeisyou. No requirements.txt, no model downloads - just Pillow and the stdlib, which ComfyUI already ships. Through Manager: search "comfyui_io_helpers" → install → restart. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/Ryuukeisyou/comfyui_io_helpers
Restart ComfyUI; the nodes live under "io_helpers".
Common issues
- No error handling. Unlike the pack's base64 loader, a bad path doesn't degrade gracefully - it's a straight
FileNotFoundErrorand the queue dies. Be sure the path exists before you run. - Relative paths are fragile. They resolve against ComfyUI's working directory, which isn't always where you think it is. Absolute paths remove the guesswork.
- The mask is only real if there's alpha. A JPEG's MASK output is empty. If you need a mask from an opaque file, use the sibling ImageLoadAsMaskByPath and pick a color channel instead.
- Path string gotchas. Forward slashes work everywhere; if you're typing a Windows path, use forward slashes or a double-backslash form to avoid escape weirdness.
Small, dumb, dependency-free - but for path-based pipelines it's the load node that should've been in core.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| file_path | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| MASK | MASK | — |