Nodes/NovelAI GENYTOOLS/NovelAI 二次接缝修复
ComfyUI Node

NovelAI 二次接缝修复

When the tiles refuse to agree, redraw the seam

By XTOGENY·Created 2 months ago·Updated 24 days ago· 19
NovelAI 二次接缝修复
  • image
  • tile_plan
  • image
  • stats
promptmasterpiece, 1girl
negative_promptblurry, 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
modelV4.5 完整版
strength0.28
noise0.00
steps23
guidance5.0
sampler欧拉祖先采样
noise_schedule卡拉斯
add_quality_tagstrue
seed0
seam_band_width64
use_cachetrue
cache_max_gb10

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 strength in 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_width too large can soften detail near seams even after the fix. 64 is a good place to start.
CategoryNovelAI/分块放大

Inputs (16)

NameTypeDefaultDescription
imageIMAGE
tile_planNAI_TILE_PLAN
promptSTRINGmasterpiece, 1girl
negative_promptSTRINGblurry, 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
modelCOMBOV4.5 完整版4 options: V4.5 完整版, V4.5 精选版, nai-diffusion-5-full, nai-diffusion-5-curated
strengthFLOAT0.280–1
noiseFLOAT0.000–1
stepsINT231–50
guidanceFLOAT5.00–10
samplerCOMBO欧拉祖先采样12 options: 欧拉祖先采样, 欧拉采样, DPM++ 2M, DPM++ 2M 随机微分, DPM++ 随机微分, DPM++ 2S 祖先采样, +6
noise_scheduleCOMBO卡拉斯6 options: 卡拉斯, 指数, 多项式指数, karras, exponential, polyexponential
add_quality_tagsBOOLEANtrue
seedINT00–4294967295
seam_band_widthINT648–512
use_cacheBOOLEANtrue
cache_max_gbINT101–100

Outputs (2)

NameTypeDescription
imageIMAGE
statsSTRING