Mosaic: Assemble (Batch)
Assemble (Batch) — put the tiles back together, seams and all
- tiles
- image
- save_path
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_linearwith a smallfeather_pxis 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.
Inputs (19)
| Name | Type | Default | Description |
|---|---|---|---|
| tiles | IMAGE | — | |
| rows | INT | 21–512 | — |
| cols | INT | 21–512 | — |
| order_modeopt | COMBO | row_major | 4 options: row_major, column_major, snake_row, snake_col |
| offset_xopt | INT | 0-10000–10000 | — |
| offset_yopt | INT | 0-10000–10000 | — |
| gutteropt | INT | 0-4096–4096 | — |
| overlap_xopt | INT | 00–4096 | — |
| overlap_yopt | INT | 00–4096 | — |
| overlap_blendopt | COMBO | last | 13 options: last, average, alpha_over, add, multiply, screen, +7 |
| blend_weightopt | FLOAT | 0.500–1 | — |
| feather_pxopt | INT | 00–2048 | — |
| exportopt | BOOLEAN | false | — |
| filetypeopt | COMBO | png | 2 options: png, jpg |
| qualityopt | INT | 951–100 | — |
| basenameopt | STRING | mosaic | — |
| subfolderopt | STRING | — | |
| bg_coloropt | STRING | #000000 | — |
| bg_alphaopt | INT | 00–255 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| save_path | STRING | — |