ImageCompositeAbsoluteByContainer
Paste images into an existing canvas, pixel-exact
- container
- images_a
- images_b
- IMAGE
ImageCompositeAbsolute lets you place two images with pixel offsets, but you have to type the canvas size yourself. ImageCompositeAbsoluteByContainer removes that step: you feed it an existing image - the "container" - and it uses that image's dimensions as the canvas. Your layers get pasted in at absolute pixel offsets on top of it, alpha-composited properly.
How it works
This node is a thin wrapper around ImageCompositeAbsolute: it reads the width and height of the first frame of the container input and forwards them as container_width and container_height. Same placement logic, same background stacking choice, same pair/matrix batch methods. It exists so a canvas doesn't have to be a number you retype - it can be an actual image in your graph.
Inputs that matter:
- container - any IMAGE; its size becomes the output canvas. This is where you'd wire an
ImageContainer(or one of theImageContainerInheritance*nodes) to get a canvas of a specific size and color. - images_a / images_b - the two layers to place.
- images_a_x / images_a_y, images_b_x / images_b_y - absolute pixel offsets, default 0 (top-left).
- background - which image is the base layer.
- method -
pair(1:1, errors if batch lengths differ) ormatrix(every combination).
Why you'd use it
The container pattern is what makes this family composable. Want a fixed 1024×1024 white backdrop? ImageContainer at 1024×1024, alpha 1, wired into container, then place your layers anywhere on it. Want the canvas to fit your two layers exactly? ImageContainerInheritanceMax or Sum supplies the container, and this node pastes into it. Since the container is a real image, you can also draw on it first (ImageDraw*ByContainer nodes) and composite on top afterward - build a background, then stamp content onto it, all in one graph.
The same cropping gotcha as the parent node applies: offsets that push an image past a canvas edge get cropped (negative offsets clamp to 0), and the output is RGBA, so a transparent container stays transparent where nothing lands.
Installing Allor
Part of the Allor Plugin (Nourepide/ComfyUI-Allor), a ~90-node image-processing pack from early 2024. Install 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 - the more reliable route given this pack's history of manual-install import errors (reinstall via Manager was the repeated community fix). Dependencies are rembg and onnx for the pack's segmentation side; no models needed here.
Gotchas that apply to the whole pack
The repo was rebased to strip images from history (shrank ~344×), so git pull/auto-update can occasionally break - the README's update-troubleshooting docs cover it; delete-and-reclone is the blunt fix. And those [Allor] lines in your console at startup are the pack writing config.json and checking for updates, not an error.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| container | IMAGE | — | |
| images_a | IMAGE | — | |
| images_b | IMAGE | — | |
| images_a_x | INT | 0 | — |
| images_a_y | INT | 0 | — |
| images_b_x | INT | 0 | — |
| images_b_y | INT | 0 | — |
| background | COMBO | 2 options: images_a, images_b | |
| method | COMBO | 2 options: pair, matrix |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |