🖼️ AITEC Image Loader
The Image Loader that walks through a folder one image at a time
- image
- mask
If you've ever wanted to batch-process a folder of images and wished the Load Image node would just move on to the next file, this is the node for you. AITEC Image Loader reads a whole folder, and uses a seed as an index into that folder's alphabetically-sorted file list - so bump the seed and you get the next image in the folder, every time.
The trick that makes it feel like magic is a detail in the source: the node returns a hidden seed + 1 back to ComfyUI, so the widget auto-increments on every run. That means you queue the workflow, it processes image 1, and the next queue run automatically picks image 2. No seed scrambling, no manual poking - the node is effectively an iterator over a folder. That's the entire reason it exists, and it's genuinely handy for img2img passes, captioning, or any "same workflow, N different inputs" loop.
Three inputs, and they're all self-explanatory:
folder_path- absolute path to your images. (The defaultD:/ComfyUI/inputis a leftover from the author's Windows machine - change it or it'll error.)seed- the index into the sorted file list. The node doesseed % len(files), so out-of-range seeds just wrap around.include_subfolders- on, it walks subdirectories withos.walk; off, it only reads the top level.
It accepts .jpg, .jpeg, .png, .bmp, .tiff - note there's no .webp here, unlike the pack's Media Loader. If the folder has no valid images it raises a clear error instead of failing silently.
Outputs are image and mask. Here's the gotcha: that mask isn't an alpha channel - it's the grayscale (luminance) version of the image, produced by converting to 'L' mode. So don't wire it into a compositing workflow expecting a transparent-mask load. It's just a luminance map, and for most img2img and VAE workflows you'll ignore it entirely.
Installation is the pack-wide route:
cd ComfyUI/custom_nodes
git clone https://github.com/AI-TEC/ComfyUI-AITECCAFE-Toolkit
pip install -r ComfyUI-AITECCAFE-Toolkit/requirements.txt
or search "AITECCAFE" in ComfyUI Manager. The heavy tensorflow/opennsfw2 dependencies get pulled in for the pack's other nodes even though this one is pure Pillow+torch - a bit of a shame for such a lightweight node, but it installs and works.
Real-world usage: drop it in front of anything that takes an IMAGE input, load a folder of raw renders, and queue. Because the seed increments each run, a batch job just keeps chewing through the folder in filename order until you stop it. If you need to jump to a specific image, type the exact index into the seed. If you want videos instead, the sibling AITEC Media Loader does the same folder-stepping with video frame control on top.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| folder_path | STRING | D:/ComfyUI/input | — |
| seed | INT | 00–18446744073709550000 | — |
| include_subfolders | BOOLEAN | false | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| mask | MASK | — |