Nodes/ComfyUI-ArchAi3d-Qwen/Simple Tile Compositor (Single)
ComfyUI Node

Simple Tile Compositor (Single)

Composite one tile at a time, loop-style

By amir84ferdos·Created 11 months ago·Updated 5 months ago· 70
Simple Tile Compositor (Single)
  • processed_tile
  • blend_mask
  • accumulator
  • weight_accumulator
  • accumulator
  • weight_accumulator
  • current_result
tile_idx0
tile_width512
tile_height512
tiles_x2
tiles_y2
overlap64

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 × mask contributions 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.

CategoryArchAi3d/Upscaling/Simple USDU

Inputs (10)

NameTypeDefaultDescription
processed_tileIMAGE
blend_maskMASK
tile_idxINT00–1000
tile_widthINT51264–4096
tile_heightINT51264–4096
tiles_xINT21–100
tiles_yINT21–100
overlapINT640–512
accumulatoroptIMAGE
weight_accumulatoroptMASK

Outputs (3)

NameTypeDescription
accumulatorIMAGE
weight_accumulatorMASK
current_resultIMAGE