Simple Tile Compositor (Single)
Composite one tile at a time, loop-style
- processed_tile
- blend_mask
- accumulator
- weight_accumulator
- accumulator
- weight_accumulator
- current_result
Most tiled upscales process the whole batch at once and stitch in one shot. This node is for the other way of working: the loop. You process one tile, composite it into an accumulator, feed the result back, and repeat until every tile is in. It's the same weighted-averaging math as the batch compositor, but designed to be called once per tile with the state passed around by hand.
It's the single-tile compositor in the "Simple USDU" subsystem of ComfyUI-ArchAi3d-Qwen, Amir Ferdos's pack (the tiling pipeline the README doesn't really cover). Where the batch compositor needs all tiles before it can start, this one works with a steady drip - which matters if your sampler is the kind you call once per tile in a loop, or if you want to preview the image growing as each tile lands.
How the accumulation works
Under the hood it maintains two running totals on the full canvas:
- accumulator - the sum of
tile × maskcontributions so far (kept unnormalized, in float32 so precision doesn't drift). - weight_accumulator - the sum of the mask weights.
Each call adds the new tile's weighted contribution, then divides to produce the current normalized result. Because it never re-normalizes the stored accumulator, later tiles can't corrupt what earlier ones built.
Inputs & outputs
Required: processed_tile (one tile), blend_mask (that tile's mask, at canvas size), plus the grid parameters tile_idx, tile_width, tile_height, tiles_x, tiles_y, overlap. Optional: accumulator and weight_accumulator - the loop state. On the first iteration leave them disconnected; from then on, wire the previous call's outputs back in.
Outputs: accumulator, weight_accumulator (both to feed the next iteration), and current_result (the normalized image so far - preview this in the loop).
Installing
cd ComfyUI/custom_nodes
git clone https://github.com/amir84ferdos/ComfyUI-ArchAi3d-Qwen.git
cd ComfyUI-ArchAi3d-Qwen
pip install -r requirements.txt
Or ComfyUI Manager → "ArchAi3d Qwen". No model files. Free for personal/non-commercial use; paid license for commercial work.
The honest take
This node only makes sense inside a loop node (ComfyUI's Repeat Into Batch-style iteration, or a scripted graph). If you're not looping, use the batch compositor - it's one node and zero state juggling. But if you're the kind of person who likes to watch a detail pass build up tile by tile and tweak a tile before it lands, this is a clean way to do it. Just remember the golden rule of this subsystem: every node in the chain has to agree on the grid parameters, or the accumulator math quietly builds a broken image.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| processed_tile | IMAGE | — | |
| blend_mask | MASK | — | |
| tile_idx | INT | 00–1000 | — |
| tile_width | INT | 51264–4096 | — |
| tile_height | INT | 51264–4096 | — |
| tiles_x | INT | 21–100 | — |
| tiles_y | INT | 21–100 | — |
| overlap | INT | 640–512 | — |
| accumulatoropt | IMAGE | — | |
| weight_accumulatoropt | MASK | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| accumulator | IMAGE | — |
| weight_accumulator | MASK | — |
| current_result | IMAGE | — |