Stitch Tiles - Clean
Glue the tiles without smearing your original's pixels back in
- processed_images
- source_tiles
- blend_masks
- prompt_system
- corrected_tiles
- final_image
You have ninety tiles of freshly generated detail and a jigsaw problem. Stitching is the last step of any tiled upscale, and it's where a good run goes bad: the classic stitcher blends the original image's detail back over the generated tiles to keep shapes honest, and on fine textures that comes out speckled. Stitch Tiles - Clean does the opposite - the source only contributes broad colour, so every bit of fine detail is what your model actually drew.
It ships marked "(test)": it sits beside the old stitcher on trial, with the same six inputs and two outputs, so it swaps in without rewiring.
Where this sits
Feed each tile the source as a ControlNet Tile condition and tiles stop drifting into patchwork - the standing advice for years. The Smart Upscaler pack goes further: a vision model reads the whole picture once, then writes a separate prompt for every tile, so a lake tile knows it's water and a roof tile knows it's part of a roof. That's the idea its author, Matt Hallett, said he'd port from his Forge-era Regional Prompt Upscaler + Detailer. Detail now arrives per tile, which leaves the joining problem.
One caveat: the pack is new and the community footprint is thin. Interesting option, not the blessed one.
How it works
It takes the planner's whole bundle - the tiles your model returned, their reference IDs, the source tiles, the tile metadata, the blend masks - and does two things, one per dropdown.
colors decides whether tiles get pulled back toward the source's tones. On Match the original's colors, each tile is corrected against its own source tile using low-frequency colour only, measured at a broad scale: the source's regional colour goes underneath, the model's fine detail stays untouched. Every tile is pulled toward the same reference, so neighbours agree at the join. Keep the new look instead solves one constant RGB offset per tile from the pixels neighbours share - the author measured neighbour mismatch dropping from 10.9 to 1.8 out of 255, where ramping each join separately only reached 4.0. Automatic reads the Prompt Director's task through prompt_system: a style or time-of-day change means even-out, anything else means match the original.
joins decides how tiles meet. Soft uses the planner's feather masks, so neighbours fade into each other across the overlap you set in the Tile Planner. Hard cut rebuilds the masks to weight exactly 1 inside each tile's core rectangle, which partitions the picture with no gap and no double-covered pixel - you see precisely which tile drew what, and joins can show as visible lines. Diagnostic, not a finish.
Inputs and outputs that matter
processed_images is the tiles your model returned, and source_tiles, tile_references, tile_metadata_json and blend_masks must all come from the same Tile Planner run that cut them. Defaults on colors and joins are sane; leave them unless you can see a problem. prompt_system is optional, but wire the Prompt Director's in, or Automatic has nothing to read and quietly behaves as "match the original" - wrong the moment your job was a style change.
corrected_tiles comes out as one image per tile in a list, which is what feeds the Tile Inspector's generated slot, same as the old stitcher. final_image goes to SaveImage.
Installing it
ComfyUI Manager, searching the pack title, is the easy path:
cd ComfyUI/custom_nodes
git clone https://github.com/HallettVisual/ComfyUI-Smart-Upscaler
Restart ComfyUI, then install ComfyUI-KJNodes and rgthree-comfy from Manager - the pack's workflow needs both, and rgthree is the kind of dependency shared graphs already assume. The pack declares no Python dependencies, so there's nothing to pip-install. Its workflow also wants about 13 GB of models, listed in docs/MODELS.md.
Where people get burned
The node is deliberately strict, and its errors name the node you grabbed the wrong wire from: "Tile references must come from Smart Tile Job Director", "Processed tile images and references must have matching counts", "Stitching did not reconstruct the complete planned tile batch." All three mean the tiles, references, metadata and masks you fed it didn't come from one coherent planner run. A one-tile test is fine (unrendered tiles get filled from the source), but a real count mismatch is a hard stop.
Second trap: the README's seam advice says to set consistency_mode to Smooth gradient, and there's no such field here. That advice belongs to the older Stitch Tiles Into One Picture node; this one always uses the single offset per tile.
Third: don't expect the stitcher to fix texture. It evens out shade differences between neighbours. A grid in flat water or sky means those planes came out different in the first place - raise overlap and feather in the Tile Planner (32/16 to 128/64 usually costs no extra tiles, since the planner just makes each tile bigger) and read the tile prompts, which is where the real answer almost always lives.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| processed_images | IMAGE | — | |
| tile_references | STRING | — | |
| source_tiles | IMAGE | — | |
| tile_metadata_json | STRING | — | |
| blend_masks | MASK | — | |
| colors | COMBO | Automatic - follow the Prompt Director (recommended) | Automatic: matches the original's colors for an upscale, and keeps your new look when the Prompt Director's task is a style or time-of-day change (connect its prompt_system; without it, Automatic matches the original). Match the original's colors: every tile takes the original's broad color, so neighbours agree. Fine detail always stays exactly as the model drew it. Keep the new look, even out the tiles: tiles are only nudged to agree with each other at the joins. Leave the tiles exactly as drawn: no color change at all. |
| joins | COMBO | Soft - fade across the overlap (recommended) | Soft: neighbouring tiles fade into each other across their overlap, as set by the Tile Planner's overlap and feather. Hard cut: each part of the picture comes from exactly one tile, with no blending at all. Useful to see exactly what each tile drew; joins can show as lines. |
| prompt_systemopt | SMART_PROMPT_SYSTEM | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| corrected_tiles | IMAGE | — |
| final_image | IMAGE | — |