Nodes/Bjornulf_custom_nodes/๐Ÿ–ผ๐Ÿ–ผ Merge Images/Videos ๐Ÿ“น๐Ÿ“น (Horizontally)
ComfyUI Node

๐Ÿ–ผ๐Ÿ–ผ Merge Images/Videos ๐Ÿ“น๐Ÿ“น (Horizontally)

Stitch up to four images side by side

By justUmenยทCreated 2 years agoยทUpdated about a year agoยท 545
๐Ÿ–ผ๐Ÿ–ผ Merge Images/Videos ๐Ÿ“น๐Ÿ“น (Horizontally)
  • image1
  • image2
  • image3
  • image4
  • IMAGE

Exactly what the name says: feed it images, get one wider image back with them lined up side by side. It's a small node, but it's the kind of thing you end up wanting constantly once you start building comparison grids, before/after strips, or stitching video frame batches together for a quick visual check.

How it works

Wire in two to four images and the node concatenates them left to right into a single output image. There's no cropping or scaling logic described anywhere beyond that - it's a straight horizontal stitch, so if your inputs are wildly different heights you'll want to resize them to match beforehand (a Resize Image node, from elsewhere in this same pack, or ComfyUI's own, works fine upstream of this).

Because the node works on the IMAGE type generically, it also works on video frame batches, not just single stills - the author explicitly built this to double as a video-merging tool. Pair it with the pack's vertical merge node and you can build a 2x2 comparison grid: merge two pairs horizontally, then feed those two results into the vertical merge node to stack them.

The inputs and outputs that matter

  • image1, image2 - required, the two images that always get merged.
  • image3, image4 - optional, add a third and fourth image to the row if you have them.
  • Output: a single IMAGE with everything merged left to right.

How to install it

Through ComfyUI Manager: search Bjornulf_custom_nodes, install, restart. Or manually:

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

Then cd into the cloned folder and run pip install -r requirements.txt - a venv is the sane way to keep this from colliding with other custom node packs' dependencies - and restart ComfyUI. On Windows portable installs, run the same pip install using the embedded python.exe in your python_embeded folder rather than a system Python.

Common issues

The most likely error you'll hit is a shape mismatch - images of different heights (or different frame counts, if you're merging video batches) won't concatenate cleanly. Resize or pad everything to the same height first; the node isn't doing that for you.

Beyond that, this node lives in the same shared package as the pack's much heavier nodes - Ollama, TTS, the CivitAI/FalAI API generators - all pulled in through one requirements.txt. If Merge Images Horizontally is missing from your node search entirely, it's usually not this node's fault: check your ComfyUI console for an import error on startup, since one missing dependency anywhere in that shared requirements file can keep the whole pack, not just one node, from loading.

CategoryBjornulf

Inputs (4)

NameTypeDefaultDescription
image1IMAGEโ€”
image2IMAGEโ€”
image3optIMAGEโ€”
image4optIMAGEโ€”

Outputs (1)

NameTypeDescription
IMAGEIMAGEโ€”