ComfyUI Node

Concat Image Batches

The two-socket node that joins videos end to end

By luxu1999·Created 23 days ago·Updated 14 days ago· 21
Concat Image Batches
  • images_A
  • images_B
  • IMAGE

If you've ever stitched two clips together in ComfyUI, you know the drill: load the frames, try to merge them, and spend ten minutes hunting for a node that just joins them. This is that node. Concat Image Batches takes two IMAGE inputs and pushes them into one - nothing else, no settings, no modes. It's the most boring node in this pack, and it's genuinely handy.

Here's the mental model: in ComfyUI an IMAGE isn't a picture, it's a batch of pictures with shape [B, H, W, C] - the B is the frame count. A 24fps, 5-second clip is an IMAGE with B = 120. Concatenating "along dimension 0" just means stacking one clip's frames after another clip's frames, so a 120-frame clip plus a 60-frame clip becomes one 180-frame clip. That's exactly what this node does: torch.cat([images_A, images_B], dim=0), straight from the source. Same operation the pack's headline MiniMax H3 Chain Director performs internally when it stitches segment frames back together; this node just exposes it for your own graphs.

You reach for it whenever two separately-rendered pieces of video need to become one before they hit something downstream - a VHS_VideoCombine save, a sampler that wants the full clip at once, or a frame pass-through that expects a single batch. It's also the natural sink for the two halves of a split workflow: render part A and part B in isolation (or on two machines), then glue them here.

The inputs. Just images_A and images_B, both IMAGE. Output is a single IMAGE - the concatenation of A then B.

The one gotcha, and it's a real one: torch.cat on the batch dimension requires everything else to match. A is 1080p, B is 720p? Error. A is 24fps, B is 30fps with different frame counts? That's fine (frame count is the batch dim, and B totals add up), but the resolution, channel count and dtype all have to agree. If you get a shape mismatch at runtime, resize one side first. A VHS_VideoCombine needs a consistent fps anyway, so this constraint will bite you at the save node regardless.

Installing it is the pack install, since this node rides along in luxu1999/ComfyUI-MiniMaxH3-ChainDirector: ComfyUI Manager search "ChainDirector", or git clone https://github.com/luxu1999/ComfyUI-MiniMaxH3-ChainDirector.git into custom_nodes/, then restart. No Python dependencies beyond torch, which ComfyUI already has. You'll probably install the whole pack for the Chain Director anyway - this little join node is a free bonus, and it's the one you'll actually use in your own stitching experiments.

It has zero Google impressions so far and ships zero config, so there's not much lore to it. Two sockets in, one socket out, nothing to tune. When you need exactly that, it's perfect.

Categoryutils

Inputs (2)

NameTypeDefaultDescription
images_AIMAGE
images_BIMAGE

Outputs (1)

NameTypeDescription
IMAGEIMAGE