NovelAI 分块融合
The tile stitcher that hides the seams for free
- processed_tiles
- IMAGE
After the refine stage you have a pile of individually-detailed tiles. Left to their own devices, they'd be a pile of individually-detailed tiles with visible lines where they meet. NAITileMerge is the stage that lays them back onto the full canvas and blends the boundaries so the mosaic reads as one image. It's also the cheapest node in the whole pipeline: pure local math, zero API calls, zero Anlas.
What it is
One input, processed_tiles (the output of NAIV45TileRefine), and one output, a single IMAGE. It places every refined tile at its planned coordinates and fades the overlaps together.
The blend is where the craft lives. Each tile gets a weight that's full strength in its interior and falls off toward its edges with a squared-sine ramp (a cosine-style fade), so where two tiles overlap, the image is a weighted average rather than a hard cut. The width of that fade was set back in the planner - blend_width - and the merge just applies it. Too narrow a blend and you see the seam; too wide and details blur where tiles disagree. The default of 64 with the default 128 overlap is the pack's tuned starting point.
Why this is the right shape
The tile-overlap-plus-fade approach is the same idea as tiled diffusion and the traditional ultimate-upscale pipeline: adjacent tiles agree on their shared pixels, and the fade hides the residual disagreement. The pack extends it with ownership masks per axis, so each pixel is a weighted contribution from the tiles that actually cover it rather than a naive average of everything. That's what keeps faces and fine lines continuous across a tile boundary instead of ghosting.
Because the merge happens locally, it's deterministic and free - you can rerun it a hundred times while tuning the downstream save or the seam-fix stage without touching your balance.
Where it sits
The classic chain:
source + upscaled → NAITilePlanner → NAIV45TileRefine → NAITileMerge → image
If seams are still visible after the merge, the pack's answer isn't to tweak the merge - it's NAISeamFix, which re-runs img2img on narrow bands around the seam boundaries. The merge gives you the best free result; the seam fix is the paid cleanup for the cases where "best free result" isn't good enough.
Install and setup
Part of ComfyUI-NovelAI-GENYTOOLS. Manager search, or:
cd ComfyUI/custom_nodes
git clone https://github.com/XTOGENY/ComfyUI-NovelAI-GENYTOOLS.git
pip install -r ComfyUI-NovelAI-GENYTOOLS/requirements.txt
Restart. It needs the token configured only because the nodes upstream of it do - this node itself never touches the network.
Gotchas
- Nothing to configure here - every knob that matters (overlap, blend width) lives in the planner. If the merge looks wrong, fix the plan, not this node.
blend_widthwas already clamped to the overlap at plan time, so if you want wider fades you must go back to the planner.- It accepts only
processed_tiles, not raw images. If you've bypassed the refine stage, there's nothing to merge. - The one-input-one-output design makes it easy to drop a preview node between refine and merge to check tile-by-tile quality before committing to the final stitch - worth doing the first time.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| processed_tiles | NAI_PROCESSED_TILES | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |