ImageContainerInheritanceSum
A canvas sized to hold two images side by side or stacked
- images_a
- images_b
- IMAGE
ImageContainerInheritanceMax gives you the tightest canvas that fits two layers. ImageContainerInheritanceSum gives you the one that adds their sizes - which is what you want when two images are going to sit side by side or stacked without overlapping. It takes images_a and images_b, builds a solid-color RGBA canvas whose dimensions are the sum of theirs, and lets you pick which axes to sum.
How it works
Three container size modes, and the choice is really "how are these two going to be arranged":
- sum - width =
width_a + width_b, height =height_a + height_b. A canvas big enough for the two images placed corner-to-corner with no overlap. The blunt option. - sum_width - widths add, heights take the max. That's a side-by-side layout, and it requires
height_a == height_b, or the node raises aValueError. If your images aren't the same height, resize one first. - sum_height - heights add, widths take the max. A stacked layout, requiring equal widths.
The container_size_type input picks the mode; the requirement checks are the way the pack keeps you honest - a mismatched pair in sum_width mode throws rather than silently producing a weird canvas.
The usual color inputs (red/green/blue, and alpha defaulting to 0 = transparent) and method (single / for_each_pair / for_each_matrix) behave like the rest of the family. Match the method to your downstream composite so batch lengths line up.
Where it sits in a workflow
The obvious use is building a tiled layout: generate two panels, sum their widths into a canvas, then ImageCompositeAbsolute each panel at its offset (panel B at x = width_a). Since the canvas inherits from the inputs, changing a panel's resolution automatically resizes the layout - no manual canvas maintenance. It also pairs with ImageCompositeRelative in sum_width mode for percentage-based placement.
Installing Allor
This is part of the Allor Plugin (Nourepide/ComfyUI-Allor), a ~90-node image-processing pack from early 2024. Install the pack once:
cd ComfyUI/custom_nodes
git clone https://github.com/Nourepide/ComfyUI-Allor
cd ComfyUI-Allor
pip install -r requirements.txt
Restart ComfyUI, or search "Allor Plugin" in ComfyUI Manager and install there - more reliable with this pack, given its history of manual-install import errors (reinstall via Manager was the repeated community fix). Dependencies are just rembg and onnx; nothing here downloads a model.
Gotchas that apply to the whole pack
The repo was rebased to drop images from history (shrank ~344×), so auto-update can occasionally break - the README's update-troubleshooting docs cover it; delete-and-reclone is the blunt fix. [Allor] console lines at startup are the pack writing config.json and checking for updates, not an error.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| images_a | IMAGE | — | |
| images_b | IMAGE | — | |
| red | INT | 255 | — |
| green | INT | 255 | — |
| blue | INT | 255 | — |
| alpha | FLOAT | 0.00 | — |
| container_size_type | COMBO | 3 options: sum, sum_width, sum_height | |
| method | COMBO | 3 options: single, for_each_pair, for_each_matrix |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |