Nodes/ComfyUI_DAO_master/Mosaic: Assemble (Batch)
ComfyUI Node

Mosaic: Assemble (Batch)

Assemble (Batch) — put the tiles back together, seams and all

By orion4d·Created about a year ago·Updated 12 months ago· 11
Mosaic: Assemble (Batch)
  • tiles
  • image
  • save_path
rows2
cols2
order_moderow_major
offset_x0
offset_y0
gutter0
overlap_x0
overlap_y0
overlap_blendlast
blend_weight0.50
feather_px0
exportfalse
filetypepng
quality95
basenamemosaic
subfolder
bg_color#000000
bg_alpha0

If you've ever done tiled diffusion - splitting a big image into chunks so your VRAM survives, then needing to glue them back - you know the gluing is the fiddly part. Mosaic Tile Assemble is the "glue back together" half of the mosaic story, the pair to this pack's Mosaic: Tile & Export node. Feed it a batch of tiles, tell it the grid, and it lays them out with optional overlap and a genuinely useful set of blend modes for hiding the seams.

It's the kind of node that looks trivial and then quietly saves you an hour. The tiled-diffusion workflow it supports is one of the most reliable routes to big images on modest cards (see the KB's upscaling notes - Tile ControlNet + tiled diffusion is a proven combo), and reassembly is exactly where a purpose-built node beats stacking generic composite nodes.

How it works

The node takes a tiles IMAGE batch plus rows and cols, and the first thing it checks is that the batch size equals rows * cols - if not, it raises ValueError: Batch=N but rows*cols=expected, which is your cue to fix the grid rather than hunt a mystery. It then computes the canvas size from the tile dimensions, offsets, gutter (gap between tiles), and overlap_x/overlap_y (how much each tile bleeds over its neighbor).

Tiles are placed in order_mode order - row_major, column_major, snake_row, or snake_col - and where they overlap, the overlap_blend mode decides who wins. The list is long: last, average, add, multiply, screen, lighten, darken, max, min, weighted, and two feather modes (feather_linear, feather_cosine). For stitching diffused tiles, feather_linear or weighted (with blend_weight) is where you start; last is the default and is really only right when there's no overlap at all.

The settings that matter

  • rows / cols - your grid. Must multiply to the batch size, period.
  • overlap_x / overlap_y - overlap in pixels. Set these to match whatever overlap you diffused with.
  • overlap_blend - the seam-hiding mode. feather_linear with a small feather_px is the usual fix for visible tile boundaries.
  • order_mode - matters more than you'd think if your tiles were produced in snake order by the tile-export node.

Outputs are image (the assembled composite) and save_path (a string that's empty unless you export). Flip export on, pick filetype (png/jpg), quality, a basename, and optionally a subfolder, and it writes to output/tiles/ and hands you the full path. bg_color + bg_alpha set the canvas behind everything.

Installing

Via ComfyUI Manager (search ComfyUI_DAO_master) or:

cd ComfyUI/custom_nodes
git clone https://github.com/orion4d/ComfyUI_DAO_master.git

Restart, and you're done - this node is pure numpy/Pillow, no extra pip packages. The pack's README is French-first, so if labels look translated, that's why.

Where people get burned

The rows * cols mismatch error is the #1 trip-up - it fails fast, which is honestly the good outcome. The other trap is assuming the default last blend hides overlap seams; it doesn't, it just keeps the most recent tile. Set an actual blend mode. And remember this is a batch assembler, not a file-folder one - if your tiles are already on disk, the Mosaic: Assemble (Folder) variant is the one you want.

CategoryDAO_master/Images/Mosaic

Inputs (19)

NameTypeDefaultDescription
tilesIMAGE
rowsINT21–512
colsINT21–512
order_modeoptCOMBOrow_major4 options: row_major, column_major, snake_row, snake_col
offset_xoptINT0-10000–10000
offset_yoptINT0-10000–10000
gutteroptINT0-4096–4096
overlap_xoptINT00–4096
overlap_yoptINT00–4096
overlap_blendoptCOMBOlast13 options: last, average, alpha_over, add, multiply, screen, +7
blend_weightoptFLOAT0.500–1
feather_pxoptINT00–2048
exportoptBOOLEANfalse
filetypeoptCOMBOpng2 options: png, jpg
qualityoptINT951–100
basenameoptSTRINGmosaic
subfolderoptSTRING
bg_coloroptSTRING#000000
bg_alphaoptINT00–255

Outputs (2)

NameTypeDescription
imageIMAGE
save_pathSTRING