Multi-Load Cowboy
Six Image Loaders, One Node, One Shared Resize — and Empty Slots Don't Error
- images
- masks
- count
- width
- height
- image_1
- image_2
- image_3
- image_4
- image_5
- image_6
Any workflow that needs a handful of reference images starts with a sprawl: six Load Image nodes, six resizes, a dozen wires. This node collapses it into one node whose face is a grid of slots sitting next to the output column - so all eleven outputs cost no extra height. Click a slot to browse the input folder or upload, drop files straight onto slots, drag one slot onto another to swap, and clear one with its corner X. It's the most genuinely well-thought-out loader UI in the pack.
How the slots behave
The six required image_1..image_6 inputs are enum selectors over your input folder, defaulting to (empty). Empty slots are skipped, not errors - a half-filled grid is a valid graph, and an all-empty grid returns a black frame plus count of 0, so a fully empty node won't crash a template. Drop several files at once and they fill the empty slots in order; drag a slot onto another to swap them.
The shared resize
Every loaded image is resized to one common size - that's the point of "one shared resize." width and height (default 1024×1024; 0 on either means derive it from the other), resize_mode, upscale_method, crop_position, pad_color, and divisible_by (rounds the output down to a multiple, 8 or 16 for most models).
The resize modes follow KJ's Resize Image V2 vocabulary, so if you've used that pack it'll feel familiar:
stretch- fills the box, changes aspect ratioresize- fits inside the box, keeps aspect (can be smaller than the box)pad- fits inside, fills empty space withpad_colorpad_edge- fits inside, stretches edge pixels into the gapscrop- fills the box exactly, cuts off what doesn't fittotal_pixels- keeps aspect ratio, area matches width × height
upscale_method defaults to lanczos - sharpest, CPU-only. For a big batch on GPU, switch to bicubic or bilinear; nearest-exact for pixel art. crop_position picks which part survives a crop and where the image sits in a pad.
The outputs
The batch output (images) holds all filled slots padded up to a common size when a fit mode leaves them uneven. The masks output carries each slot's alpha with padded regions reading as 1.0 - so when you pad a slot, the mask tells downstream nodes where the real pixels end. Plus count, width, height, and six individual image_1..image_6 outputs for wiring separate branches - because sometimes you want slot 3 on its own and slots 1-2 batched.
Installing it
Part of TrentNodes:
cd ComfyUI/custom_nodes
git clone https://github.com/TrentHunter82/TrentNodes.git
cd TrentNodes
pip install -r requirements.txt
ComfyUI Manager ("Trent Nodes") also works, modulo the standing caveat: the author renamed the repo on day one, leaving two registry entries that occasionally make Manager flag the pack as "unsafe" - clone manually if it refuses. No model downloads; OpenCV does the heavy lifting.
Where people get burned
- Expecting empty slots to be an error - they're not, by design. If
countis 0 and your output is a black frame, that's the node telling you no slots are filled, not a bug. - Lanczos slowness - it's CPU-only and can crawl on large batches. If a big grid feels sluggish, that's why; switch to bicubic on the GPU.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| image_1 | COMBO | (empty) | Selects the image for slot 1. Leave it at (empty) to skip the slot. |
| image_2 | COMBO | (empty) | Selects the image for slot 2. Leave it at (empty) to skip the slot. |
| image_3 | COMBO | (empty) | Selects the image for slot 3. Leave it at (empty) to skip the slot. |
| image_4 | COMBO | (empty) | Selects the image for slot 4. Leave it at (empty) to skip the slot. |
| image_5 | COMBO | (empty) | Selects the image for slot 5. Leave it at (empty) to skip the slot. |
| image_6 | COMBO | (empty) | Selects the image for slot 6. Leave it at (empty) to skip the slot. |
| width | INT | 10240–16384 | Sets the target width in pixels. Set it to 0 to calculate the width from the height. |
| height | INT | 10240–16384 | Sets the target height in pixels. Set it to 0 to calculate the height from the width. |
| resize_mode | COMBO | pad | Sets how each image fits the target size. stretch - fills the box exactly. This changes the aspect ratio. resize - fits inside the box. This keeps the aspect ratio. The result can be smaller than the box. pad - fits inside the box. The pad colour fills the empty space. pad_edge - fits inside the box. The edge pixels stretch into the empty space. crop - fills the box exactly. The node cuts off the parts that do not fit. total_pixels - keeps the aspect ratio. The area matches width x height. |
| upscale_method | COMBO | lanczos | Sets the method that scales the pixels. lanczos - the sharpest result. Use it for photos. It runs on the CPU only. bicubic - smooth and clean. Use it as a second choice. bilinear - softer than bicubic. It is fast. area - averages the pixels. Use it to make an image much smaller. nearest-exact - copies the nearest pixel. It keeps hard edges. Use it for pixel art. |
| crop_position | COMBO | center | Sets which part of the image the node keeps, and where the node puts the image. In the crop mode, the node keeps this part and cuts off the rest. In a pad mode, the node moves the image to this side of the box. center - keeps the middle. Use it for most images. top, bottom, left, right - keeps that edge. |
| pad_color | STRING | 0, 0, 0 | Sets the colour of the empty space in the pad mode. Write three numbers from 0 to 255, for example 0, 0, 0. A hex code also works, for example #101010. |
| divisible_by | INT | 80–512 | Rounds the output size down to a multiple of this number. Most models need 8 or 16. Set it to 0 or 1 to stop the rounding. |
| deviceopt | COMBO | cpu | Selects where the resize runs. cpu - works with every method. gpu - faster for a large batch. The lanczos method always runs on the CPU. |
Outputs (11)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | All the filled slots in one batch. Every image has the same size. |
| masks | MASK | The alpha of each filled slot. A padded area reads as 1.0. |
| count | INT | The number of filled slots. |
| width | INT | The width of the batch. |
| height | INT | The height of the batch. |
| image_1 | IMAGE | Slot 1 on its own. An empty slot gives no image. |
| image_2 | IMAGE | Slot 2 on its own. An empty slot gives no image. |
| image_3 | IMAGE | Slot 3 on its own. An empty slot gives no image. |
| image_4 | IMAGE | Slot 4 on its own. An empty slot gives no image. |
| image_5 | IMAGE | Slot 5 on its own. An empty slot gives no image. |
| image_6 | IMAGE | Slot 6 on its own. An empty slot gives no image. |