🧱 Image Merging (OreX)
Contact sheets, before-and-afters, and meme layouts in one node
- image1
- image2
- image3
- image4
- image5
- image6
- image7
- image8
- image9
- image10
- image11
- image12
- image13
- image14
- image15
- image16
- image17
- image18
- image19
- image20
- image
- width
- height
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.
Inputs (31)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | Caption 1 Caption 2 | — |
| image_number | INT | 22–20 | — |
| merging_mode | COMBO | horizontal | 7 options: horizontal, vertical, grid 2, grid 3, grid 4, grid 2 + 1, +1 |
| main_resolution_image | INT | 11–20 | — |
| footer_height | FLOAT | 5.00–100 | — |
| font_name | COMBO | 10 options: impact.ttf, YoungSerif-Regular.ttf, Oswald-Bold.ttf, PixelifySans-Bold.ttf, Caveat-VariableFont_wght.ttf, Roboto-Regular.ttf, +4 | |
| font_size | FLOAT | 4.00–100 | — |
| mode | COMBO | 14 options: white, black, crimson, coral, gold, emerald, +8 | |
| border_thickness | FLOAT | 2.00–100 | — |
| upscale_method | COMBO | lanczos | 5 options: nearest-exact, bilinear, area, bicubic, lanczos |
| megapixels | FLOAT | 0.00–100 | — |
| image1opt | IMAGE | — | |
| image2opt | IMAGE | — | |
| image3opt | IMAGE | — | |
| image4opt | IMAGE | — | |
| image5opt | IMAGE | — | |
| image6opt | IMAGE | — | |
| image7opt | IMAGE | — | |
| image8opt | IMAGE | — | |
| image9opt | IMAGE | — | |
| image10opt | IMAGE | — | |
| image11opt | IMAGE | — | |
| image12opt | IMAGE | — | |
| image13opt | IMAGE | — | |
| image14opt | IMAGE | — | |
| image15opt | IMAGE | — | |
| image16opt | IMAGE | — | |
| image17opt | IMAGE | — | |
| image18opt | IMAGE | — | |
| image19opt | IMAGE | — | |
| image20opt | IMAGE | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| width | INT | — |
| height | INT | — |