NAI 模块化分块放大
Locally upscale, then let the API redraw each tile
- source_image
- upscaled_image
- nai_pipe
- positive
- negative
- core_settings
- advanced_settings
- 图像
- 统计
Upscaling has a dirty secret: the pixel upscaler and the detail upscaler are different jobs. A Lanczos or ESRGAN pass makes an image bigger but adds no real new detail; generative upscalers invent detail but tend to rewrite faces and cost enormous VRAM. This node is the tiled third way that the upscaling docs describe as "Tiled Diffusion / Ultimate SD Upscale" territory - except the tiled re-render runs on NovelAI's API instead of your GPU. You upscale locally (bigger, cheap, no hallucination), then this node cuts the big image into overlapping tiles and runs an img2img pass on each one, so the API does the detail-work at a per-tile resolution it can actually handle. Then it sews the tiles back together.
That's the whole architecture and it's why the inputs look the way they do:
Inputs
- source_image - the original small image.
- upscaled_image - the locally-upscaled version (ESRGAN, AnimeSharp, whatever you like - the pack doesn't ship an upscaler, it assumes you have one). Both are needed because the plan uses the source for geometry and the upscaled for the tiles.
- The usual pipe, positive/negative prompts, and core/advanced cards - the tiles are generated with your normal style settings.
- tile_width / tile_height - 0 means "follow the source image's dimensions"; otherwise set explicit tile sizes. 0 is the sane default.
- overlap_x / overlap_y - default 128px. Tiles overlap so seams have context. The README calls out separate control of overlap and the actual blend bandwidth, which is the part that makes seams disappear.
- blend_width - default 64px. How wide the feather between tiles is during the merge.
- strength - default 0.28. Low on purpose: this is a detail pass, not a redraw. The node warns loudly if you push it.
- noise - default 0.
- seed - derived per tile from the base seed plus tile coordinates, so a repeat run reproduces the same result.
- chroma_cleanup - default 0.65. Suppresses the scattered colored speckles that low-strength img2img over-tiling loves to produce. This is the "why is my big image full of rainbow noise" fix, built in.
- use_cache / cache_max_gb - per-tile cache (10GB default cap). The killer feature: if the run dies at tile 40 of 60, the re-run only re-requests the missing 20. Every completed tile is a cache hit at 0 Anlas.
Outputs are the merged IMAGE and a 统计 line showing tiles processed, API calls, cache hits, and the cleanup value.
Where it fits and what to watch
This is genuinely the pattern the local-upscale + tile-refine crowd uses for print-size anime images - "upscaler + detail pass is the best combo" - and the API version trades your VRAM for per-tile Anlas. Cost discipline is mandatory: a 6×6 tile grid is 36 paid requests, which is why the cache and the README's "set a budget" advice exist. Each tile request is the size you chose, so 512px tiles are materially cheaper than 1024px tiles.
The traps: mismatched tile size between the API response and the plan errors out (a NovelAI tile came back a different size than planned), so keep the tiles at sane 64-multiples. And the README notes the obvious companion to the model matrix - you can attach character regions, Vibes or precise reference to the tile pipeline, but Vibes and precise reference only work on the models that support them, so no combining with V5.
Install
Search ComfyUI-NovelAI-GENYTOOLS in ComfyUI Manager or git clone https://github.com/XTOGENY/ComfyUI-NovelAI-GENYTOOLS.git into custom_nodes, pip install -r requirements.txt, Persistent API Token in settings. Brand-new pack, so the README's tile-upscale example workflow is your best first run - load it, check tile count and the Anlas ceiling, then queue.
Inputs (18)
| Name | Type | Default | Description |
|---|---|---|---|
| source_image | IMAGE | — | |
| upscaled_image | IMAGE | — | |
| nai_pipe | NAI_PIPE | — | |
| positive | NAI_POSITIVE_PROMPT | — | |
| negative | NAI_NEGATIVE_PROMPT | — | |
| core_settings | NAI_CORE_SETTINGS | — | |
| advanced_settings | NAI_ADVANCED_SETTINGS | — | |
| tile_width | INT | 00–4096 | — |
| tile_height | INT | 00–4096 | — |
| overlap_x | INT | 1280–1024 | — |
| overlap_y | INT | 1280–1024 | — |
| blend_width | INT | 640–512 | — |
| strength | FLOAT | 0.280–1 | — |
| noise | FLOAT | 0.000–1 | — |
| seed | INT | 00–4294967295 | — |
| chroma_cleanup | FLOAT | 0.650–1 | — |
| use_cache | BOOLEAN | true | — |
| cache_max_gb | INT | 101–100 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| 图像 | IMAGE | — |
| 统计 | STRING | — |