AI2Go Multi Image Loader
Eight source images, one node — the img2img workflow de-clutterer
- count
- image_1
- image_2
- image_3
- image_4
- image_5
- image_6
- image_7
- image_8
Stock Load Image is a one-file node, and that's fine until the day you want to run img2img on several different reference images in a single queued run - each one feeding its own branch of the graph. Before this node, the answer was N separate loaders. The AI2Go Multi Image Loader collapses that to one node: drop up to eight images onto it and every one lands on its own image_N socket.
Of the pack's six multi-loaders, this is the one most people will actually reach for, because image-in is the center of gravity of the whole ecosystem. Refining a contact sheet, running a style pass over a folder of references, comparing two seeds against two different source images - all of those want several images loaded at once, and none of them wants the node sprawl that used to require.
How it works
Drop files onto the field (or click it to browse). Each file uploads into ComfyUI's input/ folder, the same place stock Load Image writes, so workflows survive restarts. The file list lives in a hidden files_json widget the front-end maintains - leave it alone. At run time each row is loaded with Pillow, EXIF-transposed (so phone photos come out the right way up), converted to RGB, and handed out as a standard IMAGE tensor.
The one real feature beyond "multiple files" is downscaling. If you set downscale_mode to anything other than off, any image whose longest edge exceeds max_size (default 1200, range 8–8192) gets shrunk on load. Three modes:
keep aspect ratio- shrink preserving shape so the longest edge ismax_sizecrop to square- centered square, at mostmax_sizestretch to square- force amax_sizesquare, ignoring shape
Two gotchas baked in: keep aspect ratio and crop to square never upscale - small images pass through untouched. And stretch to square may enlarge the shorter side, because forcing a square does that. Originals in input/ are never modified; you're getting a copy.
Inputs and outputs
Inputs: files_json (hidden - don't touch), downscale_mode, max_size, and output_slots. The only one you'll fiddle with day to day is output_slots, which defaults to auto (sockets follow the file list) and can be pinned to a fixed 1–8 count so your wires stay put while you swap images.
Outputs: count plus image_1 through image_8. count = number of files actually emitted (enabled rows), not total rows. Wire each image_N anywhere you'd wire a Load Image output - VAE Encode, img2img conditioning, whatever.
The off-toggle trap
Rows have an on/off toggle, and switching one off keeps its socket position while making that socket output None. That's the same as an unplugged OPTIONAL input, so it's safe feeding optional sockets - but a switched-off row feeding a REQUIRED input will fail downstream on None. If a row no longer belongs, remove it. And watch the status-line warning whenever you remove or reorder files: sockets shift, so your wires may now carry different images than you think.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/Little-God1983/ComfyUI-AI2Go-Utils
Restart ComfyUI (or install via Manager, searching "ComfyUI-AI2Go-Utils"). No extra dependencies - Pillow ships with ComfyUI. Fair warning before you rely on it: this repo is frozen at v1.6.1, issues are closed, and the author now develops the same pack as ComfyUI-IntoTheLatent-Utils under new ITL* node names. Old workflows keep working here; new development lives over there.
Common issues
- "not found in the input folder - re-add it": you moved or deleted the source in
input/. Re-drop it. - Images unexpectedly small:
downscale_modeisn'toff, ormax_sizeis lower than you think. These modes only ever shrink. - Square output when you wanted the shape kept: you picked
crop to squareorstretch to square, which is exactly what they promise.
For a multi-image batch pipeline it's a genuine quality-of-life win - one node instead of a loader farm, and the downscale pass saves you a resize node per branch.
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 (9)
| Name | Type | Description |
|---|---|---|
| count | INT | — |
| image_1 | IMAGE | — |
| image_2 | IMAGE | — |
| image_3 | IMAGE | — |
| image_4 | IMAGE | — |
| image_5 | IMAGE | — |
| image_6 | IMAGE | — |
| image_7 | IMAGE | — |
| image_8 | IMAGE | — |