图像批次合并
The least surprising node in the pack (and why that's fine)
- images_a
- images_b
- images
Image Batch Concat does exactly one thing: takes two image batches and stacks them end to end. images_b goes after images_a, along the batch dimension. That's it. It's the kind of node that gets no press because nothing about it is exciting - and it's also the kind of node you'll quietly need in every long-video workflow.
The reason it exists instead of you just using a torch.cat in your head is that ComfyUI batches don't concatenate themselves. Folder loaders, segment outputs, and reference groups all produce separate batches, and whenever you need "these frames, then those frames" as a single batch for a downstream encoder or video assembler, something has to join them. This node is that something, with forgiving behavior that keeps graphs from breaking:
- Both inputs connected → concatenated result.
- Only one connected → that side passes through unchanged (a clone, so upstream mutations don't leak).
- Neither connected → outputs
Noneinstead of throwing. That "silent None" is deliberate and matches how the rest of this pack treats optional image inputs.
What you set
Nothing. There are no parameters - just images_a and images_b sockets and one images output. If you've read the pack's README you'll have seen this exact node doing the unglamorous job of merging folder-loader outputs into one reference batch.
When you'd reach for it
- Merging two folder loaders' outputs into a single reference batch for WanAnimate or SCAIL.
- Appending a generated segment to the previous segment's frames before a video encode.
- Building a batch in stages where the exact count only matters at the end.
For a beginner this node is also a good teaching tool: it's the definition of node plumbing (see the KB's node-plumbing doc) - it manages data flow, touches no pixels, and its entire contract fits in one sentence.
Install
Ships in user2318/ComfyUI-CustomNodeKit. ComfyUI Manager: search "CustomNodeKit". Or:
cd ComfyUI/custom_nodes
git clone https://github.com/user2318/ComfyUI-CustomNodeKit.git
cd ComfyUI-CustomNodeKit
pip install -r requirements.txt
then restart. No models, no downloads, pure torch cat.
The gotcha
It concatenates along the batch (frame) dimension only - it does not blend, resize, or reconcile. If images_a and images_b are different resolutions, you'll get a batch with mismatched shapes and a downstream node will complain loudly. The pack's sibling ImageBatchResizeNode exists precisely to fix that before you concat. Also note the pass-through clones rather than referencing - that's a feature (no surprises when the source node re-runs), but it means the output won't reflect later changes to either input if only one side is connected. And the None-when-empty behavior is silent: if you expect frames and get None, check whether both upstreams actually produced output, because this node won't tell you.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| images_aopt | IMAGE | 第一个图像批次。images_b将拼接到此批次后方。如果仅此路有输入,将直接透传输出。First image batch. images_b will be concatenated after this batch. If only this input is provided, it will be passed through directly. | |
| images_bopt | IMAGE | 第二个图像批次。将被拼接到images_a后方构成完整批次。如果仅此路有输入,将直接透传输出。Second image batch. It will be concatenated after images_a to form the complete batch. If only this input is provided, it will be passed through directly. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |