Load Image with Subfolders
The Load Image node that finally sees your subfolders
- IMAGE
- MASK
ComfyUI's built-in Load Image only lists files sitting directly in ComfyUI/input/. The moment you organize - input/characters/alice.png, input/reference/poses/01.png - those files just don't show up in the dropdown, and you're stuck flattening folders or renaming. LoadImagewithSubfolders is the fix: a drop-in replacement that walks the whole input tree and gives you every image, subfolders included, in one combo.
It comes from the Nukun pack (OnekoSL/Nukun_ComfyUI_Nodes), a personal grab-bag of ComfyUI conveniences. There's nothing fancy about this one - it's a small quality-of-life node that plugs straight into the socket your Load Image already uses.
How it works
Mechanically it's nearly identical to core Load Image, which is the point. Instead of listing only input_dir's top level, it does os.walk() over the entire input directory (skipping the clipspace folder) and builds the file dropdown from the relative paths. Load the file, EXIF-transpose it, convert to a float tensor - same pipeline, same IMAGE output you're used to.
Two details are worth knowing:
- It keeps core's
IS_CHANGEDbehavior: the node hashes the file each run, so if you overwrite an image on disk, the node re-reads it instead of serving a cached version. - Alpha channel handling matches core too. An RGBA/PNG with transparency comes out as
IMAGEplus aMASKcomputed as1 - alpha- white where the image is transparent. That's the same convention every ComfyUI compositing node expects, so you can wire theMASKstraight into an Inpaint/Composite workflow without re-deriving anything.
The one input that matters
There's exactly one: the image dropdown, populated from every file under input/. You can still drag a file onto it to set the path. Outputs are IMAGE and MASK, wired exactly like the stock node.
Installing it
Install the whole pack once (all Nukun nodes come together):
cd ComfyUI/custom_nodes
git clone https://github.com/OnekoSL/Nukun_ComfyUI_Nodes.git
Restart ComfyUI. Or search "Nukun" in ComfyUI Manager. Dependencies are light - numpy, Pillow, scipy, PyWavelets - and ComfyUI brings torch itself, so there's nothing heavy to babysit.
Where people get tripped up
The only real gotcha is organizational: if your input/ folder is a junk drawer, this combo gets long fast. That's not a bug, it's the node telling you your folder structure needs a sweep. If you want subfolder support without the scrolling, keep your input tree shallow - or just use this node and let the dropdown be your file browser. It's a tiny win, but for anyone who actually organizes input files, it's the kind of thing you install and then never think about again.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| image | COMBO | 1 options: example.png |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| MASK | MASK | — |