Caching Image Loader
The Image Loader That Makes You Type the Path (and It's Fine)
- IMAGE
- MASK
Let's get the awkward truth out first: "Caching Image Loader" is ComfyUI's stock LoadImage node, cloned into its own pack, with the file picker ripped out and a text box put in its place. The "caching" in the name isn't a superpower - the built-in LoadImage already hashes files to bust ComfyUI's cache. What this node actually gives you is one thing: the ability to load an image by typing a path, no upload button, no dropdown, no dragging files into ComfyUI/input first.
That's genuinely useful if you work with images that live outside the input folder - a network share, a script-generated file, a path you want to paste in. And unlike most "load by path" hacks, this one validates the path and tells you plainly when it's wrong.
How it works
The mechanism is borrowed wholesale from stock LoadImage. Its IS_CHANGED method reads the file and returns a SHA-256 digest of the bytes, so ComfyUI only re-runs everything downstream when the file's contents actually change. That's the whole cache story. It's correct, but it's also exactly what the core node already does.
Where it differs: loading. load_image opens the path string you typed directly, converts it to RGB as a float tensor (0–1, shape [B, H, W, 3]), runs exif_transpose so phone photos aren't sideways, and iterates frames - an animated GIF or multi-page file comes out as a batched IMAGE, not just frame one.
The inputs and outputs that matter
There's exactly one input, a plain STRING:
- image - a file path. The default literally says
enter path to file, which is a placeholder, not a real path. Change it or the node errors.
Two outputs, both familiar if you've ever used stock LoadImage:
- IMAGE - the tensor. Wire it into
VAEEncode, an img2img sampler, or anything expecting an image. - MASK - the alpha channel as a ComfyUI mask, inverted (white where the image is transparent), sized to the image. No alpha channel? You get a throwaway 64×64 zero mask, same as core. Feed it to inpainting or compositing nodes.
Installing it
ComfyUI Manager → search ComfyUI-ownimage → install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/ownimage/ComfyUI-ownimage
Restart ComfyUI. No models to download and no real dependencies - requirements.txt just lists torch, safetensors, and Pillow, all of which any working ComfyUI already has. The bundled install.py never actually runs (it's defined in __init__.py but never called), so there's nothing to trip on there.
Where people get burned
- Left the placeholder in. If you see
enter path to fileas an error, that's it. Type an actual path. - Paths resolve against ComfyUI's working directory. The validator checks it via ComfyUI's annotated-path helper, but loading opens the raw string. In practice: use a path relative to the ComfyUI install folder -
input/photo.png, notC:\abs\path- and on Windows prefer forward slashes to dodge escaping headaches. If a path validates but still fails to load, drop anyinput:/output:prefix. - Console spam. Every cache check prints a loud
############### Digest ...banner. Cosmetic, but you'll notice it.
Honest bottom line: it's a one-commit utility from a pack with no README, and its own bundled example workflow doesn't even use it. If the file picker is your enemy, this is a fine 30-second fix. Otherwise, stock LoadImage does everything it does, minus the typing.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| image | STRING | enter path to file | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| MASK | MASK | — |