Nodes/ComfyUI-ArchAi3d-Qwen/Simple Tile Compositor
ComfyUI Node

Simple Tile Compositor

Stitch your tiles back together with no seams at all

By amir84ferdos·Created 11 months ago·Updated 5 months ago· 70
Simple Tile Compositor
  • processed_tiles
  • blend_masks
  • original_image
  • final_image
  • debug_weights
tiles_info

This is the payoff node of the whole Simple USDU pipeline - the one that turns your batch of processed tiles back into a single image. And it's where most naive tiled upscales fall apart, because the naive way to stitch tiles is to just paste them, and pasting is what makes the seams. This node does it properly: weighted averaging, where each pixel's final value is the sum of every tile's contribution weighted by its blend mask, divided by the sum of the weights.

It's the compositing step in the "Simple USDU" subsystem of ComfyUI-ArchAi3d-Qwen (Amir Ferdos's pack - the tiling side is the half the README doesn't document). The formula it implements is the classic seam-killer:

result[x, y] = sum(tile[x, y] * mask[x, y]) / sum(mask[x, y])

Overlapping regions get averaged across every tile that covers them, weighted so each tile dominates its own center and fades at its edges. Seams become gradients instead of cuts.

Inputs

  • processed_tiles - the batch of tiles you got back from your sampler(s). One tile per grid position, in the same order the cropper produced them.
  • blend_masks - the batched masks from Simple Blend Mask (Batch), at full canvas size.
  • tiles_info - the JSON string from the cropper (or cropper batch). This is how the compositor knows the grid geometry, so it doesn't guess.
  • original_image (optional) - a fallback. Any area where no tile's mask reaches (zero accumulated weight) is filled from this image instead of staying black. Wire the input image in and you'll never see a dark hole where the grid didn't quite cover.

Outputs: final_image (the stitched result) and debug_weights (an IMAGE showing where the weight accumulation is thin - genuinely useful for diagnosing gaps or uneven blending).

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 downloads; numpy/Pillow only, both already in ComfyUI. Free for personal use; commercial use requires the pack's paid license.

Where the gotchas live

If your output has a faint grid, it's almost always one of two things: the tiles_info geometry doesn't match the batch (say, you mixed a cropper from one grid with masks from another), or you skipped the original_image fallback and the grid didn't fully cover the canvas. Keep every node in the chain on the same grid parameters - or wire the Solver V6.2's tile_params bundle through the batch nodes so they can't disagree. The compositor is dumb in exactly one way: it trusts the JSON you feed it. Feed it the right geometry and it's a genuinely seam-free stitch.

CategoryArchAi3d/Upscaling/Simple USDU

Inputs (4)

NameTypeDefaultDescription
processed_tilesIMAGE
blend_masksMASK
tiles_infoSTRING
original_imageoptIMAGE

Outputs (2)

NameTypeDescription
final_imageIMAGE
debug_weightsIMAGE