Add Image to Batch
Slot one frame into an existing image batch
- image
- batch
- images
Sooner or later you'll have a batch of frames and one single image that needs to live somewhere inside it - a fixed reference frame, a manually touched-up correction, a title card. Rebuilding the whole batch by hand to make room for one image is tedious. Add Image to Batch does the one thing its name says: it takes a single image and a batch, and puts the image into the batch at whatever position you tell it, index and all.
How it works
Conceptually it's simple - one image goes in at a specific slot, everything else keeps its order - but it's the kind of node that only exists because ComfyUI's batches are plain tensors with no built-in "insert at position" operation. Doing this by hand normally means slicing the batch tensor around your insertion point and concatenating, which is exactly the fiddly, error-prone busywork this node is here to remove.
The inputs and outputs that matter
Three required inputs, no optional ones:
image(IMAGE) - the single image you want inserted.batch(IMAGE) - the existing batch you're inserting it into.index(INT, default0, range 0–999) - where in the batch it lands. Index 0 is the front of the batch; push it higher to place it further in.
One output, images (IMAGE, list) - the resulting batch with your image now part of it, ready to feed into whatever comes next: a sampler, a save node, or a batch-processing node further down the chain.
How to install it
Search "Link Comfy Nodes" in ComfyUI Manager and install from there - that's the path of least resistance. If you'd rather do it by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/Mister-Link/link-comfy-nodes
pip install -r link-comfy-nodes/requirements.txt
Restart ComfyUI once either method finishes. This is a lightweight utility node inside a much bigger pack that also covers WAN video helpers, color tools, and save/preview nodes - you're not pulling in anything heavy just for this one.
Common issues & troubleshooting
Index out of range for your batch size. The widget lets you dial up to 999, but that number is a UI ceiling, not a guarantee it's valid for your actual batch - if your batch only has 20 frames and you set the index to 500, expect an error rather than the image silently landing at the end. Check your batch length before picking an index, especially in a dynamic pipeline where frame counts change run to run.
Mismatched image dimensions. Like most batch operations in ComfyUI, this expects the single image and the batch to share the same height and width. If your reference image came from a different source (a different aspect ratio load, a crop that didn't match) resize it to match the batch first - a resize node upstream is cheaper to debug than a shape-mismatch error downstream.
Confusing "add" with "replace." The node inserts your image as an additional frame - it doesn't overwrite whatever was already at that index. If what you actually want is to swap one frame out for another rather than grow the batch by one, this isn't that node; you'd want something that replaces by index instead.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| batch | IMAGE | — | |
| index | INT | 00–999 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |