FL Image Batch
Combine a variable number of images into one batch
- image_1
- image_2
- images
Core ComfyUI's Image Batch node takes exactly two images. The moment you want to combine five, or fifteen, or a variable number depending on the workflow, you either chain a pile of two-at-a-time batch nodes or reach for something like FL_ImageBatch - a version of the same idea where the number of image inputs is a widget you adjust, not a hard limit baked into the node.
How it works
It's built around a small trick: an inputcount widget that dynamically adds or removes image_N sockets on the node itself, from 2 up to 100. Internally, it runs ComfyUI's own ImageBatch node repeatedly to fold everything together, so you get the same underlying behavior you'd get chaining stock batch nodes by hand - including the automatic resize: any image that doesn't match the first image's dimensions gets scaled to match before batching, using bicubic or area interpolation depending on whether it's scaling up or down.
The inputs and outputs that matter
inputcount(2–100, default 2) - set this first; it controls how manyimage_Nsockets appear on the node.image_1,image_2, … - one socket per image you're combining, up to whateverinputcountis set to.
Output: images, a single IMAGE batch containing everything you wired in, in socket order.
How to install it
Part of ComfyUI_Fill-Nodes. ComfyUI Manager: search ComfyUI_Fill-Nodes, install, restart. Or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/filliptm/ComfyUI_Fill-Nodes
then restart. No models, no extra dependencies - it's orchestration around a stock ComfyUI node.
Common issues & troubleshooting
Change inputcount first, then wire your images. The sockets appear based on that widget's value - if you set inputcount to 5 but only wire 3 images, the unconnected sockets will error or default oddly depending on your ComfyUI version. Match the count to what you're actually plugging in.
Everything gets resized to match image_1. This is convenient (you don't need to manually resize a batch of mismatched images first) but also means image_1 is quietly the "reference" for the whole batch's final dimensions - if you wire your images in an order where the first one happens to be an odd size or aspect ratio, everything else gets stretched to match it. Put your most representative image first if that matters to you.
Not the same job as FL_ImageBatchToImageList or FL_ImageListToImageBatch. This node combines multiple separate image inputs into one batch. If you already have a Python-list-style set of images from an upstream node and just need them converted to a batch tensor (or vice versa), those are the nodes for that - FL_ImageBatch is for the "I have N distinct image sockets to merge" case specifically.
Large inputcount values make for a wide node. Nothing functionally wrong with setting it to 40 or 50, but the node grows a socket per image - past a certain count it's easier to read the graph if you batch in stages (e.g. two FL_ImageBatch nodes of 20 each, feeding a final combine) than one enormous node.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| inputcount | INT | 22–100 | — |
| image_1 | IMAGE | — | |
| image_2 | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |