Nodes/comfyui-OreX/🧱 Image Merging (OreX)
ComfyUI Node

🧱 Image Merging (OreX)

Contact sheets, before-and-afters, and meme layouts in one node

By orex2121·Created about a year ago·Updated 3 days ago· 34
🧱 Image Merging (OreX)
  • image1
  • image2
  • image3
  • image4
  • image5
  • image6
  • image7
  • image8
  • image9
  • image10
  • image11
  • image12
  • image13
  • image14
  • image15
  • image16
  • image17
  • image18
  • image19
  • image20
  • image
  • width
  • height
textCaption 1 Caption 2
image_number2
merging_modehorizontal
main_resolution_image1
footer_height5.0
font_name
font_size4.0
mode
border_thickness2.0
upscale_methodlanczos
megapixels0.0

The most underrated node in the OreX pack, honestly. Image Merging is a layout-and-caption tool: it takes up to 20 images, arranges them into a horizontal strip, a vertical stack, or one of several grid patterns, adds optional caption text underneath each one, draws borders, and upscales the composite to a target resolution. That's a contact sheet generator, a before/after comparator, and a "grid of my LoRA tests with labels" maker all in one node. If you've ever exported a grid from Photoshop just to show four images side by side, this replaces that step permanently.

How it works

The images come in through optional image1 through image20 inputs (the source registers up to 20), and image_number tells it how many of those to use. merging_mode picks the layout: horizontal, vertical, or the grid patterns (grid 2, grid 3, grid 4, grid 2 + 1, grid 3 + 1 - the "+1" variants give one image a bigger featured cell). The captions come from the text field, one per line, rendered under each cell in the chosen font_name at font_size (both percentages of the target height), on a mode-colored background - the color list doubles as a text/border color picker, and there are fonts bundled in the pack.

Sizing is handled by main_resolution_image (which image in the set defines the base resolution - everything gets normalized to it), megapixels (an optional target budget for the whole composite), and upscale_method (default lanczos) for the final resize. border_thickness adds the frame between cells.

Inputs that matter

For a beginner, four things: text (captions, one per line), image_number (how many of the image inputs to merge), merging_mode (the layout), and the imageN inputs themselves. The rest is polish you'll tune when the output isn't pretty.

Outputs: image (the composite), width, height.

Install

ComfyUI Manager (search "comfyui-OreX") or:

cd ComfyUI/custom_nodes
git clone https://github.com/orex2121/comfyui-OreX

Restart. Fonts ship with the pack; no downloads.

Where people get tripped up

The image limit is set in the source (range(1, 21) for the inputs and max: 20 on image_number) - if you need 25 images in a grid, you're editing the .py file. The layout quirks in the "+1" grid modes take a run or two to internalize: which image gets the big cell depends on main_resolution_image. And captions: a blank line in text means no footer for that image, so check your line count matches your image count or you'll get a lopsided sheet. But once you've used it for one comparison grid, you'll keep finding reasons to reach for it.

CategoryOreX-nodes/Image Merging

Inputs (31)

NameTypeDefaultDescription
textSTRINGCaption 1 Caption 2
image_numberINT22–20
merging_modeCOMBOhorizontal7 options: horizontal, vertical, grid 2, grid 3, grid 4, grid 2 + 1, +1
main_resolution_imageINT11–20
footer_heightFLOAT5.00–100
font_nameCOMBO10 options: impact.ttf, YoungSerif-Regular.ttf, Oswald-Bold.ttf, PixelifySans-Bold.ttf, Caveat-VariableFont_wght.ttf, Roboto-Regular.ttf, +4
font_sizeFLOAT4.00–100
modeCOMBO14 options: white, black, crimson, coral, gold, emerald, +8
border_thicknessFLOAT2.00–100
upscale_methodCOMBOlanczos5 options: nearest-exact, bilinear, area, bicubic, lanczos
megapixelsFLOAT0.00–100
image1optIMAGE
image2optIMAGE
image3optIMAGE
image4optIMAGE
image5optIMAGE
image6optIMAGE
image7optIMAGE
image8optIMAGE
image9optIMAGE
image10optIMAGE
image11optIMAGE
image12optIMAGE
image13optIMAGE
image14optIMAGE
image15optIMAGE
image16optIMAGE
image17optIMAGE
image18optIMAGE
image19optIMAGE
image20optIMAGE

Outputs (3)

NameTypeDescription
imageIMAGE
widthINT
heightINT