Mosaic: Tile & Export
Slice an image into tiles for tiled diffusion
- image
- tiles_batch
- output_dir
If you've ever tried to upscale a 4K image on a 6GB card, you know the trick: you don't feed the whole thing to the model, you cut it into tiles, process each one, and stitch them back together. That's tiled diffusion, and it's the whole reason MosaicTileExport exists. The pack's README says it outright: this node is "ideal for preparing images for tiled diffusion workflows." You feed it an image, it slices it into a grid of tiles, hands you the tiles as a batch and saves them to disk as individual files.
How it works
The node takes your image, divides it into rows × cols tiles, and returns them two ways: as a batched IMAGE tensor (for in-graph processing - run each tile through your diffusion/upscale nodes) and as files on disk (each tile saved as basename_r01_c03.png-style filenames, numbered row-major). The tile naming convention is the important part - it's designed to match what this pack's assemble node expects (MosaicTileAssemble / MosaicAssembleFromFolder), so tile → process → reassemble round-trips cleanly.
Two behaviors around the edges:
fit_mode=crop(default) - tiles are exactlywidth/colsbyheight/rows, and the right/bottom edge of the image is dropped if it doesn't divide evenly. Nothing gets padded; you lose a sliver.fit_mode=pad- the canvas is padded up to a multiple of rows/cols, so every pixel survives.
That distinction matters if your image dimensions aren't divisible by your grid - a 1024-wide image into 3 columns is a decision about whether to lose 1 pixel or pad it.
Inputs that matter
image- the source.rows,cols(defaults 2×2, up to 512) - the grid. For real tiled diffusion you'll typically want more and smaller tiles.fit_mode- crop vs pad, above.filetype(png/jpg),quality,basename,subfolder- the export settings.
Outputs
tiles_batch - an IMAGE batch, one per tile, in row-major order (top-left first). output_dir - a string with the output directory plus a newline-separated list of every saved file path. The output lands under ComfyUI/output/tiles/<basename>_<rows>x<cols>_<timestamp>/.
How to install
Part of the orion4d/ComfyUI_DAO_master pack:
cd ComfyUI/custom_nodes
git clone https://github.com/orion4d/ComfyUI_DAO_master.git
pip install -r requirements.txt
Restart ComfyUI. No models.
Common issues
The big one is crop dropping edge pixels - if the reassembled image is smaller than your source, that's why (switch to pad). Keep the file naming as-is if you plan to reassemble, because the assemble nodes parse r##_c## from the filenames - rename them and the round-trip breaks. And note this node produces non-overlapping tiles; for overlap-based blending you'll get that on the assemble side, not here.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| rows | INT | 21–512 | — |
| cols | INT | 21–512 | — |
| fit_modeopt | COMBO | crop | 2 options: crop, pad |
| filetypeopt | COMBO | png | 2 options: png, jpg |
| qualityopt | INT | 951–100 | — |
| basenameopt | STRING | tiles | — |
| subfolderopt | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| tiles_batch | IMAGE | — |
| output_dir | STRING | — |