ITL Multi Image Loader Advanced
Multi Image Loader, plus masks and filenames per image
- count
- image_1
- mask_1
- filename_1
- image_2
- mask_2
- filename_2
- image_3
- mask_3
- filename_3
- image_4
- mask_4
- filename_4
- image_5
- mask_5
- filename_5
- image_6
- mask_6
- filename_6
- image_7
- mask_7
- filename_7
- image_8
- mask_8
- filename_8
The Advanced flavor of ITL's Multi Image Loader does everything the basic one does - up to 8 files, each on its own socket - and adds two outputs per file that turn it into a real workhorse for inpaint and compositing workflows: a mask_N and a filename_N.
If you're doing multi-image inpaint - loading a photo plus its prepared mask, or feeding several masked regions through the same pipeline - the stock ComfyUI answer is a web of Load Image + Load Image (mask) pairs that never quite stay aligned. This node gives you one place to load image_1 alongside mask_1, image_2 alongside mask_2, and so on, so the pairing can't drift.
What the extra sockets do
- mask_N - the image's alpha channel, inverted, exactly like stock Load Image's mask output. Files without an alpha channel yield the stock 64×64 empty mask, same as ComfyUI's built-in loader. So a flat JPEG still gives you a usable (empty) mask socket - it just won't mask anything.
- filename_N - the file's name as a string. This is the socket people underestimate. Wire it into a filename node or a SaveImage prefix and suddenly each output can be named after its source, which is a genuine time-saver when you're saving a batch of processed variants and want to know which input each came from.
Everything else is inherited from the basic loader, and it's worth repeating the two gotchas because they don't change here:
- The row on/off toggle keeps the socket position but outputs
None. That's fine for OPTIONAL inputs downstream, fatal for REQUIRED ones. If you toggle a row off and a required input getsNone, that node errors. output_slotscan be pinned (1–8) to keep your sockets and wires in place while you swap files;autofollows the file list, so sockets appear and vanish as you edit.
Same downscaling options as the basic node (off / keep aspect ratio / crop to square / stretch to square with a max_size threshold), and masks are resized along with their image so the pair always stays aligned. count counts enabled files actually emitted, not rows.
Install
ComfyUI Manager (search "ComfyUI-IntoTheLatent-Utils") or:
cd ComfyUI/custom_nodes
git clone https://github.com/Into-The-Latent/ComfyUI-IntoTheLatent-Utils
then restart. No extra dependencies.
When should you reach for this over the basic version? The rule of thumb: grab Advanced if you're touching masks or need filenames anywhere in the workflow. If you just need reference images on separate sockets, the basic node is simpler and you won't miss the extra outputs. If you're doing any multi-image inpainting, the mask+image pairing here is exactly the ergonomics you want.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| files_json | STRING | [] | Authoritative file list as JSON. Hidden in the UI and kept in sync by the front-end — drop files onto the node instead of editing this. |
| downscale_mode | COMBO | off | off = images pass through untouched. keep aspect ratio = shrink keeping shape so the longest edge is max_size. crop to square = centered square, at most max_size. stretch to square = force a max_size square (ignores shape). Never upscales (keep aspect ratio/crop to square); masks follow their image. |
| max_size | INT | 12008–8192 | Size threshold/target in pixels for downscaling. Ignored while downscale_mode is off. |
| output_slots | COMBO | auto | How many output sockets to show. 'auto' follows the number of loaded files, so sockets appear and disappear as you edit the list. Pick a fixed number to keep the sockets (and your wires) in place while you swap files around — extra sockets with no file behind them output nothing, so don't wire more than you load. |
Outputs (25)
| Name | Type | Description |
|---|---|---|
| count | INT | — |
| image_1 | IMAGE | — |
| mask_1 | MASK | — |
| filename_1 | STRING | — |
| image_2 | IMAGE | — |
| mask_2 | MASK | — |
| filename_2 | STRING | — |
| image_3 | IMAGE | — |
| mask_3 | MASK | — |
| filename_3 | STRING | — |
| image_4 | IMAGE | — |
| mask_4 | MASK | — |
| filename_4 | STRING | — |
| image_5 | IMAGE | — |
| mask_5 | MASK | — |
| filename_5 | STRING | — |
| image_6 | IMAGE | — |
| mask_6 | MASK | — |
| filename_6 | STRING | — |
| image_7 | IMAGE | — |
| mask_7 | MASK | — |
| filename_7 | STRING | — |
| image_8 | IMAGE | — |
| mask_8 | MASK | — |
| filename_8 | STRING | — |