πΌοΈ Multi-Image Aspect Ratio Composer
Compose up to 8 images into one frame, sized and face-centered automatically
- image_1
- image_2
- image_3
- image_4
- image_5
- image_6
- image_7
- image_8
- composed_image
- width
- height
- info
Making a collage the dumb way means manually resizing and stacking images at pixel coordinates. This node does it smartly: you tell it how many images you're feeding, what aspect ratio and total resolution you want, and it computes the layout, resizes and crops each image to fit, and hands back one composed image - plus, optionally, centers each crop around a detected face. It's the "feed this into an img2img model to make a coherent multi-subject image" node, and it's the workhorse of the pack's image tools.
The dynamic input trick
Set input_count (1β8), click Update Inputs, and the node's image_1 β¦ image_8 inputs appear or disappear to match. That's the one workflow gotcha: the inputs aren't all there by default - the node dynamically regenerates them from the count, so if an input seems "missing," bump the count. The README's troubleshooting confirms it: "Missing images β check all inputs connected + click Update Inputs."
Inputs that matter
input_count(1β8) - how many images you're composing.aspect_ratio- a 15-option list from 1:1 to 21:9 and 9:21, plus photo and monitor ratios.megapixels- 0.5 MP up to 32 MP; the node auto-calculates exact pixel dimensions from ratio Γ MP.arrangement-horizontal,vertical,smart_grid,classic_grid. Smart grid picks the layout from your count and ratio (8 images at 16:9 β two rows of 4; at 1:1 β 3,3,2; at 9:16 β four rows of 2). Classic grid is the boring equal grid; the two linear ones stack everything in a line.spacing(px) andbackground_color-black,white, ortransparent.
Face detection is where it earns its name: face_detection off/haar_cascade/dnn_face, plus face_detection_confidence (1.1β3.0, default 1.3). Haar is the fast CPU cascade; DNN is the more accurate deep model. With detection on, each crop is centered on the largest detected face rather than the image center - which is exactly what you want for portraits and character sheets. The README's warning: detection is slow, disable it for non-portrait material.
Outputs
composed_image (IMAGE) - the final canvas. Plus width and height (INT) and an info string. Typical use: composed image β VAE encode β img2img, or straight to Save.
Install and caveats
Part of DenRakEiw_Nodes: ComfyUI Manager β "DenRakEiw Nodes", or git clone https://github.com/DenRakEiw/DenRakEiw_Nodes + pip install -r requirements.txt + restart. Face detection needs opencv-python, which the requirements pin.
Caveats: high megapixels values (16β32 MP) on many inputs can eat serious RAM - the README says reduce megapixels on memory issues. Haar cascade misses angled or heavily stylized faces; that's what the confidence knob is for. And it's a one-author pack with minimal support, so the GitHub issues page is your help desk. But for the character-sheet/composite job, the face-centering alone is worth the install.
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| input_count | INT | 21β8 | β |
| aspect_ratio | COMBO | 16:9 (Widescreen) | 15 options: 1:1 (Square), 4:3 (Standard), 3:4 (Portrait), 16:9 (Widescreen), 9:16 (Vertical), 21:9 (Ultrawide), +9 |
| megapixels | COMBO | 2 MP | 10 options: 0.5 MP, 1 MP, 2 MP, 4 MP, 6 MP, 8 MP, +4 |
| arrangement | COMBO | horizontal | 4 options: horizontal, vertical, smart_grid, classic_grid |
| spacing | INT | 00β100 | β |
| background_color | COMBO | black | 3 options: black, white, transparent |
| face_detectionopt | COMBO | disabled | 3 options: disabled, haar_cascade, dnn_face |
| face_detection_confidenceopt | FLOAT | 1.31.1β3 | β |
| image_1opt | IMAGE | β | |
| image_2opt | IMAGE | β | |
| image_3opt | IMAGE | β | |
| image_4opt | IMAGE | β | |
| image_5opt | IMAGE | β | |
| image_6opt | IMAGE | β | |
| image_7opt | IMAGE | β | |
| image_8opt | IMAGE | β |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| composed_image | IMAGE | β |
| width | INT | β |
| height | INT | β |
| info | STRING | β |