OreX Image Merging V2
Stitch up to 20 images into one canvas — captions, borders, and a target resolution in a single pass
- image1
- image2
- image3
- image4
- image5
- image6
- image7
- image8
- image9
- image10
- image11
- image12
- image13
- image14
- image15
- image16
- image17
- image18
- image19
- image20
- image
- width
- height
Before-and-after comparisons, style grids, contact sheets, "here's the whole batch at a glance" - that's the boring half of ComfyUI that nobody ships as a node. OrexImageMergingV2 is the boring half, done well. It takes 2 to 20 images, lays them out horizontally, vertically, or in a grid, adds captions under each one, borders around them, and even forces the whole thing to a target resolution. It's a pure Pillow compositor, so it's instant, uses zero VRAM, and needs no model downloads. You drop it in right before a Save Image node and stop babysitting image editors.
It's part of the comfyui-OreX pack by the Russian duo OreX and Pavel K., a grab-bag of load/save, LLM, and image-utility nodes that's actively developed. Fair warning: the pack's README is stale and only documents the image load/save nodes - it won't tell you this node exists. The code is fine, the docs just lag.
How it works
Everything is proportional to one reference image, which is the thing to understand first. main_resolution_image (default 1) picks which input sets the base width/height, and then all the sizing is relative to that. In horizontal mode every image is scaled to the same height as the main one; in vertical mode they all match its width. The grid modes scale by area instead. The +1 layouts ("grid 2 + 1", "grid 3 + 1") are the collage-style ones - small images stacked on the left, one big "hero" image spanning the right side.
The spacing knobs are all percentages of the base image's height, not pixels: footer_height (default 5), font_size (4), and border_thickness (2). Set the mode color and you get that as the background and border with an auto-picked contrasting text color. Captions only render when the caption string is non-empty and footer_height is above zero - the classic silent-failure combo.
megapixels is the sleeper feature. Leave it at 0 and you get whatever the layout math produces. Set it to, say, 2.0 and it scales the entire final canvas (border, footer, text included) so the total lands at 2 megapixels, re-rasterizing with your chosen upscale_method (lanczos by default). That's how you guarantee a sane output size without doing mental math about your source images.
Inputs and outputs that matter
- image_number (2–20): how many image slots to expose. The node's frontend adds and removes the
image/captionpins automatically when you change it, which is a genuinely nice touch. - main_resolution_image: the reference image everything scales from.
- merging_mode: horizontal, vertical, grid 2/3/4, grid 2+1, grid 3+1.
- megapixels: target total output size in MP; 0 = off.
- Optional image1..image20 and caption1..caption20.
Outputs are image (feed straight into Save Image or the pack's own orex Save Image), plus width and height as INTs - handy if you want the filename or downstream math to know the result dimensions.
Install
Via ComfyUI Manager (search "comfyui-OreX"), or the manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/orex2121/comfyui-OreX
Restart ComfyUI. Dependencies are just Pillow plus soundfile (the latter is for the pack's audio node - the merging node only needs Pillow, which is already there). No models to download.
Common issues
- Everything comes out tiny. You set
main_resolution_imageto a low-res input, so the whole layout inherits that scale. Point it at your highest-res image, or just usemegapixelsand stop worrying. - Grid needs all its slots filled. In "grid 3 + 1" with only three images wired, the node quietly outputs just the first image. If a layout looks wrong, check you're feeding everything you asked
image_numberfor. - Captions don't appear. footer_height is 0, or the caption is empty. Both are required.
- Update pain. The README's first line tells users to delete the old
comfyui-OreXfolder and reinstall when upgrading - stale files from an older version are the known cause of weird behavior. - Fonts missing from the
font_namedropdown? They ship inside the pack, so a fresh clone fixes it.
Inputs (50)
| Name | Type | Default | Description |
|---|---|---|---|
| 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 | — | |
| caption1opt | STRING | — | |
| image2opt | IMAGE | — | |
| caption2opt | STRING | — | |
| image3opt | IMAGE | — | |
| caption3opt | STRING | — | |
| image4opt | IMAGE | — | |
| caption4opt | STRING | — | |
| image5opt | IMAGE | — | |
| caption5opt | STRING | — | |
| image6opt | IMAGE | — | |
| caption6opt | STRING | — | |
| image7opt | IMAGE | — | |
| caption7opt | STRING | — | |
| image8opt | IMAGE | — | |
| caption8opt | STRING | — | |
| image9opt | IMAGE | — | |
| caption9opt | STRING | — | |
| image10opt | IMAGE | — | |
| caption10opt | STRING | — | |
| image11opt | IMAGE | — | |
| caption11opt | STRING | — | |
| image12opt | IMAGE | — | |
| caption12opt | STRING | — | |
| image13opt | IMAGE | — | |
| caption13opt | STRING | — | |
| image14opt | IMAGE | — | |
| caption14opt | STRING | — | |
| image15opt | IMAGE | — | |
| caption15opt | STRING | — | |
| image16opt | IMAGE | — | |
| caption16opt | STRING | — | |
| image17opt | IMAGE | — | |
| caption17opt | STRING | — | |
| image18opt | IMAGE | — | |
| caption18opt | STRING | — | |
| image19opt | IMAGE | — | |
| caption19opt | STRING | — | |
| image20opt | IMAGE | — | |
| caption20opt | STRING | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| width | INT | — |
| height | INT | — |