Multi Image Loader (TJ)
Batch-loading with Multi Image Loader (TJ)
- BATCH
- WIDTH
- HEIGHT
- FILENAMES
If you've ever built a ControlNet batch or a dataset pass by chaining eight Load Image nodes into a make_batch, you know how fast that turns into a mess. Multi Image Loader (TJ) is that mess, unbuilt: it loads a whole stack of images into one IMAGE batch tensor, normalizes their resolutions, and hands you the batch plus its dimensions in a single node. It's the input hub of the TJ_NODE batch system, and honestly it's the node from this pack I'd tell a stranger to grab first.
How it works
The node gives you a thumbnail grid in its body. You drag and drop files in, hit a folder picker, or paste a URL to download - then reorder them by dragging. All of that just fills an internal image_paths_json list; on run, the node resolves each path and stacks the decoded images into one tensor. Two details make it feel different from a plain loader:
- Path sandboxing. It refuses anything outside ComfyUI's
input/,output/, anddownload/folders, and blocks..escapes. Load from there and you'll never trip over it, but if you point it at an absolute path elsewhere it'll throw a deliberate error instead of silently reading your whole disk. - FILENAMES output. The loader tracks the original filename for every image it loaded. That one string output is what makes Save With Original Names (TJ) work - you load a batch and save it back out under the same filenames later.
The inputs that matter
Most of the grid is UI, so you'll only touch a few fields directly:
match_mode/resize_input- decide how images get normalized.Keep Input Ratiowith aresize_inputoflong edge/short edgescales toedge_sizeon one side;Megapixelmode normalizes everything to roughlymegapixeltotal pixels. This is what you want when your batch mixes portrait and landscape.scale_method-Center Croppads/crops to a clean shape;Force Fitsquashes to exactly the custom dimensions. Crop, almost always.batch_select- a quick way to pull a subset (1,2,4), handy when you don't want to delete anything from the grid.
Outputs
BATCH(IMAGE) - wire this into your sampler, ControlNet preprocessor, or whatever eats the batch.WIDTH,HEIGHT(INT) - the normalized dimensions, useful for a latent or resolution node so everything downstream stays in sync.FILENAMES(STRING) - original names, newline-separated. Feed it to Save With Original Names or grep it for bookkeeping.
With auto_set on (default), the node also publishes TJ / BATCH, TJ / WIDTH, and TJ / HEIGHT as wireless providers, so other TJ nodes can receive the batch without a wire crossing your whole canvas.
Installing it
The pack installs the standard way - ComfyUI Manager, search ComfyUI-TJ_NODE, Install, restart. Or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/designloves2/ComfyUI-TJ_NODE
Then restart ComfyUI. This node has no special dependencies beyond the pack itself (PIL, numpy, torch - all standard).
Where people get burned
Mixed resolutions are the classic trip-up: throw a 512×512 and a 4K landscape into the same batch and your sampler will silently work on mismatched tensors or the node will crop things you didn't mean to crop. Decide what the batch should look like before you load, set match_mode accordingly, and keep scale_method on Center Crop. And remember the path rule - files living outside the ComfyUI folders are refused by design. If you're loading a stack of reference images for a compare or an upscale grid, this is the loader you want.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| image_paths_json | STRING | [] | — |
| auto_set | BOOLEAN | true | — |
| match_mode | COMBO | Keep Input Ratio | 2 options: Keep Input Ratio, Megapixel |
| resize_input | COMBO | none | 4 options: none, long edge, short edge, Custom |
| edge_size | INT | 102464–8192 | — |
| custom_width | INT | 102464–8192 | — |
| custom_height | INT | 153664–8192 | — |
| megapixel | FLOAT | 1.00.1–16 | — |
| interpolation | COMBO | lanczos | 4 options: lanczos, nearest, bilinear, bicubic |
| scale_method | COMBO | Center Crop | 2 options: Center Crop, Force Fit |
| batch_select | STRING | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| BATCH | IMAGE | — |
| WIDTH | INT | — |
| HEIGHT | INT | — |
| FILENAMES | STRING | — |