Nodes/NovelAI GENYTOOLS/NAI 模块化分块放大
ComfyUI Node

NAI 模块化分块放大

Locally upscale, then let the API redraw each tile

By XTOGENY·Created 2 months ago·Updated 24 days ago· 19
NAI 模块化分块放大
  • source_image
  • upscaled_image
  • nai_pipe
  • positive
  • negative
  • core_settings
  • advanced_settings
  • 图像
  • 统计
tile_width0
tile_height0
overlap_x128
overlap_y128
blend_width64
strength0.28
noise0.00
seed0
chroma_cleanup0.65
use_cachetrue
cache_max_gb10

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.

CategoryNovelAI 2.0/分块放大

Inputs (18)

NameTypeDefaultDescription
source_imageIMAGE
upscaled_imageIMAGE
nai_pipeNAI_PIPE
positiveNAI_POSITIVE_PROMPT
negativeNAI_NEGATIVE_PROMPT
core_settingsNAI_CORE_SETTINGS
advanced_settingsNAI_ADVANCED_SETTINGS
tile_widthINT00–4096
tile_heightINT00–4096
overlap_xINT1280–1024
overlap_yINT1280–1024
blend_widthINT640–512
strengthFLOAT0.280–1
noiseFLOAT0.000–1
seedINT00–4294967295
chroma_cleanupFLOAT0.650–1
use_cacheBOOLEANtrue
cache_max_gbINT101–100

Outputs (2)

NameTypeDescription
图像IMAGE
统计STRING