NovelAI 二次接缝修复
When the tiles refuse to agree, redraw the seam
- image
- tile_plan
- image
- stats
You merged the tiles and it's 95% perfect, but there's a faint vertical line where two tiles disagreed, or a band where the detail visibly changes. That's the seam. NAISeamFix is the pack's dedicated second pass for it: it redraws only the narrow strips around each tile boundary with NovelAI img2img, so the seam gets regenerated with coherent content instead of whatever the merge fudged. It costs Anlas, and it's cheaper than rerunning the whole grid.
What it is
Inputs: the merged image, the original tile_plan (so it knows where the boundaries are), and the sampling stack - prompt, negative_prompt, model, strength, noise, steps, guidance, sampler, noise_schedule, add_quality_tags, seed. Then the seam-specific controls:
seam_band_width(default 64) - the width of the band around each seam that gets redrawn. Wider covers more, but also regenerates more of the image (and costs more per patch).use_cache/cache_max_gb- the same per-patch caching as the refine stage.
Outputs: image (the fixed canvas) and stats (how many seam patches were planned, how many were real API calls, how many cache hits).
How it works
The seam fixer computes a set of strip patches along the horizontal and vertical boundaries between tiles. Each patch gets a stable derived seed (your seed plus coordinates plus a "seam" pass name, so reruns reproduce), runs img2img on it at the same low strength as the main refine, and then blends the result back into the canvas using a mask that's strongest right on the seam and fades out across the band. The old seam pixels are replaced by newly generated ones that have context on both sides, which is exactly what a hard merge can't give you.
It keeps the same low default strength as the refine pass (0.28) for the same reason: a seam fix shouldn't move the image, it should just erase the boundary. Keep it low. (The all-in-one node gives seam fixing its own separate seam_strength input, defaulted even lower at 0.16 - here, on the standalone node, it's the shared strength slider.)
When you need it
Not every tile upscale needs the seam fix - it depends on how much the tiles disagreed. In the single-node workflow (NAITiledRefineAllInOne) it's a checkbox you can leave off and turn on only for the images that need it. In the staged pipeline, it's the fourth and final stage after planner → refine → merge. If your merged image looks clean, skip it and save the Anlas. If you see lines or tonal bands, run it and compare.
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, set your NovelAI Persistent API Token under NovelAI 2.0: Persistent API Token.
Gotchas
- It's a paid stage: each seam patch is a separate API call. The stats string shows the real count, and the cache makes reruns cheap, but the first run bills.
- It needs the original
tile_plan, not just the image - keep the planner's output wired through if you think you'll want this stage. - If you raised
strengthin the refine stage, seams are more likely to need fixing (tiles drifted further apart). The seam fix is partly a rescue for over-aggressive refine settings. - Blending is weighted by the band mask, so
seam_band_widthtoo large can soften detail near seams even after the fix. 64 is a good place to start.
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| tile_plan | NAI_TILE_PLAN | — | |
| prompt | STRING | masterpiece, 1girl | — |
| negative_prompt | STRING | blurry, lowres, upscaled, artistic error, film grain, scan artifacts, worst quality, bad quality, jpeg artifacts, very displeasing, chromatic aberration, color noise, chroma noise, colored speckles, halftone, multiple views, logo, too many watermarks, negative space, blank page | — |
| model | COMBO | V4.5 完整版 | 4 options: V4.5 完整版, V4.5 精选版, nai-diffusion-5-full, nai-diffusion-5-curated |
| strength | FLOAT | 0.280–1 | — |
| noise | FLOAT | 0.000–1 | — |
| steps | INT | 231–50 | — |
| guidance | FLOAT | 5.00–10 | — |
| sampler | COMBO | 欧拉祖先采样 | 12 options: 欧拉祖先采样, 欧拉采样, DPM++ 2M, DPM++ 2M 随机微分, DPM++ 随机微分, DPM++ 2S 祖先采样, +6 |
| noise_schedule | COMBO | 卡拉斯 | 6 options: 卡拉斯, 指数, 多项式指数, karras, exponential, polyexponential |
| add_quality_tags | BOOLEAN | true | — |
| seed | INT | 00–4294967295 | — |
| seam_band_width | INT | 648–512 | — |
| use_cache | BOOLEAN | true | — |
| cache_max_gb | INT | 101–100 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| stats | STRING | — |