ImageCompositeAbsolute
Place two images on a canvas with pixel-exact offsets
- images_a
- images_b
- IMAGE
Compositing in stock ComfyUI is a two-node dance: scale everything to the same size, then Composite. That works but it's rigid. ImageCompositeAbsolute is the Allor version that treats placement like coordinates: two image inputs, an X/Y offset in absolute pixels for each, and an output canvas of whatever size you dictate (or auto-fit). Alpha is handled properly the whole way - both images are treated as RGBA and merged with real alpha compositing, not a hard paste.
How it works
The node pastes images_a at (images_a_x, images_a_y) and images_b at (images_b_x, images_b_y) onto a canvas, then alpha-composites them. The background input decides stacking order: images_a means A is the base layer, images_b means B is. If either input image has only 3 channels, the node adds an opaque alpha channel before compositing, so plain generated images just work.
Inputs that matter:
- images_a / images_b - the two layers.
- images_a_x / images_a_y and images_b_x / images_b_y - integer pixel offsets for each, default 0 (top-left corner of the canvas).
- container_width / container_height - canvas size. 0 means auto: it becomes the max of the two images. This is the input that trips people - set it to 0 unless you specifically want a fixed canvas.
- background - which image is underneath.
- method -
pairzips the batches 1:1 (and raisesValueErrorif batch lengths differ);matrixproduces every A×B combination.
Where people get burned
Offsets are not clamped to the canvas - if an offset pushes an image past an edge, that part is cropped away (negative offsets are clamped to 0). If you place something at x = 900 on a 512-wide container and wonder where it went, that's what happened. Also remember the output is RGBA: composite onto a container if you want an opaque result, because a transparent canvas stays transparent where nothing was placed.
Why you'd use it
It's the cleanest way to build a layout where you've already decided the exact pixel positions - a collage, a comparison grid, a watermark corner, placing a cutout (from a background-removal node, say) at a precise spot on a backdrop. Because it lives in tensor space and does one pass per pair, it's also fast with batches: set up a pair composite once and it processes whole lists.
Installing Allor
Part of the Allor Plugin (Nourepide/ComfyUI-Allor), ~90 nodes 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, or search "Allor Plugin" in ComfyUI Manager (the more reliable route - early Reddit threads about Allor are mostly manual-install import errors, fixed by reinstalling via Manager). Dependencies are rembg + onnx for the pack's segmentation side; this node needs no models.
Gotchas that apply to the whole pack
The repo was rebased to strip images from history (shrank ~344×), which can break git pull/auto-update - see the README's update-troubleshooting docs; delete-and-reclone is the blunt fix. [Allor] console lines at startup are the pack writing config.json and checking updates, not an error.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| 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 | — |
| container_width | INT | 0 | — |
| container_height | INT | 0 | — |
| background | COMBO | 2 options: images_a, images_b | |
| method | COMBO | 2 options: pair, matrix |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |