Nodes/Bjornulf_custom_nodes/๐Ÿ–ผ๐Ÿ”— Combine Images
ComfyUI Node

๐Ÿ–ผ๐Ÿ”— Combine Images

Batch several images into one stream (with an all_in_one gotcha)

By justUmenยทCreated 2 years agoยทUpdated about a year agoยท 545
๐Ÿ–ผ๐Ÿ”— Combine Images
  • image_1
  • IMAGE
โ—„number_of_images2โ–บ
โ—„all_in_onefalseโ–บ

This node collects several separate image inputs and hands them onward as one IMAGE output. The name is a little misleading - it does not paste images side by side into a collage. It combines them in the ComfyUI plumbing sense: it takes N image connections and merges them into a single stream you can pass to the next node. If you want them stitched into one canvas horizontally or vertically, that's a different node (the pack's Merge Images/Videos nodes).

Where you'd reach for it: you've got a few images coming from different branches - maybe a couple of Load Image nodes, or a handful pulled from a folder - and you want to funnel them into one downstream node without wiring each separately.

How it works

There are two modes, controlled by the all_in_one toggle, and this is the part people trip on:

  • all_in_one off (default): the images are combined into a list - they travel together but stay individual frames. They can be different resolutions. This is the safe default and what you want most of the time.
  • all_in_one on: the images are stacked into a single batched tensor. That requires every image to be the same resolution, and it errors (or misbehaves) if they aren't. You need this mode for nodes that expect a true image batch - the pack's "Select an Image, Pick" node is the example the author calls out.

A subtle thing: with a Preview Image node you often can't visually tell the two modes apart, because both just show the images. The difference is structural, not visual.

The inputs and outputs that matter

  • number_of_images - how many image inputs the node exposes (1 to 50, default 2). Bump this and more image_N slots appear.
  • all_in_one - the mode toggle described above. Off = list, on = single batched tensor (same-resolution only).
  • image_1 (and image_2, image_3, โ€ฆ up to your count) - the images to combine.

Output is a single IMAGE. This is also an output node, so it terminates a branch cleanly.

How to install it

ComfyUI Manager: search Bjornulf_custom_nodes, install, restart. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/justUmen/Bjornulf_custom_nodes

Then restart ComfyUI. This node is pure image tensor handling, so it doesn't need any of the pack's heavier dependencies - but running pip install -r Bjornulf_custom_nodes/requirements.txt won't hurt if you plan to use other nodes in the pack.

Common issues

The number-one issue is turning on all_in_one with mismatched resolutions. If you get a tensor/shape error out of this node, that's almost certainly it - either resize the images to match first, or leave all_in_one off. Only enable it when the downstream node genuinely needs a single batched tensor and you've confirmed the sizes line up.

If you were expecting a side-by-side collage and got what looks like separate images instead, you want a Merge node, not this one. And remember all_in_one off keeps images as a list, which some nodes iterate over one at a time - handy when that's what you want, surprising when it isn't.

CategoryBjornulf

Inputs (3)

NameTypeDefaultDescription
number_of_imagesINT21โ€“50โ€”
all_in_oneBOOLEANfalseโ€”
image_1IMAGEโ€”

Outputs (1)

NameTypeDescription
IMAGEIMAGEโ€”