NovelAI V4.5 逐块重绘
Refining one tile at a time, without the seams showing
- tile_plan
- processed_tiles
- stats
The middle stage of the pack's tile upscale machine, and the one that does the actual paid work. NAIV45TileRefine takes the plan from the planner, cuts the upscaled image into tiles, and runs each tile through NovelAI's img2img to add real detail. Every tile is a separate API call, which is why the planner exists to count them first.
What it is
Input tile_plan (from NAITilePlanner), then the sampling stack: prompt, negative_prompt, model (default V4.5 完整版), strength (default 0.28), noise, steps, guidance, sampler, noise_schedule, add_quality_tags, and seed. Plus two cache controls, use_cache and cache_max_gb. Outputs processed_tiles (the refined tiles, wired into NAITileMerge) and a stats string with the API-call and cache-hit counts.
The low default strength of 0.28 is deliberate: each tile is already the upscaled version of a real image, so the pass is meant to add detail without moving anything. Crank strength up and tiles start inventing their own compositions, which is how you get a mosaic where the subject's face changes from tile to tile. Keep it low; that's the whole discipline of this node.
How it stays consistent across tiles
Three mechanisms, all worth knowing because they're what make tile refining usable at all:
Stable derived seeds. Each tile gets its own seed, deterministically derived from your seed plus the tile's coordinates via a SHA-256 hash. Same seed, same tile positions → the same per-tile images, every run. That's how a rerun reproduces instead of scattering different noise into each tile.
Per-tile caching. Every completed tile is cached to disk under ComfyUI's user directory. Interrupted or network-failed mid-way? Rerun and only the missing tiles actually hit the API. On a pay-per-call machine, resumable caching is the difference between "retry cost me another 20 Anlas" and "retry cost me nothing."
Chroma speckle suppression. Low-strength img2img on tiles has a known failure mode: scattered colored pixels that look like static. The node post-processes each tile to suppress those, which keeps the merged image from looking like a broken TV.
Model and capability notes
It's named V4.5 for a reason - the classic pipeline assumes a V4.5 model. It does accept V5 (nai-diffusion-5-full / nai-diffusion-5-curated) in the dropdown, but the pack's capability matrix means some V5-only features (transparent background, text blocks) don't apply to per-tile img2img the way they do to a clean generation. When in doubt, V4.5 is the safe, tested default for tiling.
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
- Every tile is a paid API call. The
statsoutput tells you exactly how many went out; the planner'splanned_callstells you how many will. Compare them after a run - if cache hits are high, your second run is nearly free. - Don't touch
strengthcasually. 0.28 exists so the tiles agree with each other; the seam-fix stage handles remaining disagreements. - The cache keys include input pixels, model, prompt, seed, coordinates, and sampling params, so changing any of those invalidates the cache. That's correct behavior - you don't want stale tiles from an old prompt silently reused.
- This is the stage that makes the calls; plan with the planner, then accept that the refine stage is your bill.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| 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 | — |
| use_cache | BOOLEAN | true | — |
| cache_max_gb | INT | 101–100 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| processed_tiles | NAI_PROCESSED_TILES | — |
| stats | STRING | — |