๐งฉ BBox Multiple Assembler
Stitch N inpainted regions back onto one image without the seams
- base_image
- crops
- masks
- image
- combined_mask
- checker
Every crop-and-stitch inpaint ends the same way: put the enhanced crops back where they came from, at their exact coordinates, so the untouched original pixels survive byte-for-byte. Core ComfyUI's ImageCompositeMasked does that for a single region. This node is the list-aware successor for the multi-region case - when several masked regions have each been cropped, prompted and denoised separately, it folds all N back onto one base image in a single pass.
That's the payoff of the whole aioli approach: the source image's dimensions are preserved end to end, only the crops go through the model, and nothing outside the masks is touched. The assembler is where all of it lands.
How it works
It's INPUT_IS_LIST, so it maps over the N crops, N masks and N coordinate sets automatically - no manual unrolling of your region list. The interesting design decisions are about layering.
The order dropdown controls paint order. list_first_on_top means the last list item is the bottom layer - which is why RegionMaskList deliberately appends the background mask last, so it sits under the objects. area_large_under sorts by area automatically, big zones underneath.
mask_adjust is the clever bit: it grows (+) or shrinks (โ) each mask on the full image canvas, not inside the crop. So you can extend a region after generation without re-running the sampler. Compositing still happens only inside each crop rectangle, so where a grown mask spills past its crop, the layer below shows through - true per-hierarchy transparency rather than an imposed base-image overwrite. Grow and feather are separable and downscaled internally, which keeps large radii fast.
The pack also claims, and the claim is checkable, that it's byte-identical to ImageCompositeMasked for a single region with feather = 0, mask_adjust = 0 - so switching a working single-region graph to multi-region isn't a leap of faith.
Inputs and outputs
base_image- the full-resolution untouched source.crops,masks,x,y,width,height- all lists, one entry per region (x/y/width/height are the per-crop coordinates from the fix/crop stage).order-list_first_on_top(default) orarea_large_under.mask_adjust- grow/shrink each mask on the full canvas, โ512 to 512, default 0.feather- Gaussian edge softening, default 8.opacity- per-layer opacity, default 1.0.
Outputs: image (the recomposed result), combined_mask (the union of all composited regions), and checker - a debug view with each region outlined in its own colour, so you can verify the layout.
Installing it
Ships in the Aioli Nodes pack. ComfyUI Manager โ search "Aioli Nodes", or:
cd ComfyUI/custom_nodes
git clone https://github.com/aiolicollective/aioli-nodes
Restart ComfyUI; it's under Aioli Nodes. No extra dependencies - just torch, numpy and Pillow, all bundled with ComfyUI.
Where people get burned
Two gotchas, both easy to hit. First, it silently works on the minimum list length: if your crops, masks and coordinates lists disagree in size, extra entries are dropped with no fanfare - keep the lists aligned, or a region quietly vanishes. Second, if a grown mask spills past its crop, the layer below shows through, and people sometimes read that as a bug. It's not: it's the transparency model doing its job. If you want the spill to write content, the region's crop needs to be bigger or mask_adjust lower. Also note the checker outline is always drawn (frozen in the code), so it stays useful even if you don't ask for it. Young pack, small studio, no big forum trail - the GitHub issues page is the real support channel.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| base_image | IMAGE | โ | |
| crops | IMAGE | โ | |
| masks | MASK | โ | |
| x | INT | โ | |
| y | INT | โ | |
| width | INT | โ | |
| height | INT | โ | |
| orderopt | COMBO | 2 options: list_first_on_top, area_large_under | |
| mask_adjustopt | INT | 0-512โ512 | โ |
| featheropt | INT | 80โ512 | โ |
| opacityopt | FLOAT | 1.000โ1 | โ |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | โ |
| combined_mask | MASK | โ |
| checker | IMAGE | โ |