3.8 KiB
A model-agnostic MultiDiffusion tiled hires-fix / refiner that re-renders an image in overlapping tiles without producing tile seams. It works on any model (SD / SDXL / Flux / etc.) and needs no extra node packs.
It runs a single sampling pass over the whole image. Every denoising step the latent is split into overlapping tiles, the model is evaluated per tile, and the predictions are averaged in latent space (MultiDiffusion, Bar-Tal et al.). Because the tiles are re-synced every step they can't diverge, so:
- there are no tile seams and no "double-exposure" ghosting to blend away, and
- per-step UNet activations stay tile-sized — you get whole-image coherence at roughly tile-sized peak VRAM, unlike a single full-image pass.
This node does not upscale on its own. Upscale the image first (e.g. Upscale Image By or an upscale-model node), then feed it in here with a low denoise (~0.3–0.5) to refine the detail — the classic "hires fix", done in tiles.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| image | IMAGE | The (already-upscaled) image to refine in tiles. |
| model | MODEL | The diffusion model. |
| positive | CONDITIONING | Positive conditioning, shared across all tiles. |
| negative | CONDITIONING | Negative conditioning, shared across all tiles. |
| vae | VAE | VAE used to encode the image and decode the result. |
| seed | INT | Sampling seed. |
| steps | INT | KSampler steps. |
| cfg | FLOAT | Classifier-free guidance scale. |
| sampler_name | COMBO | KSampler sampler. |
| scheduler | COMBO | KSampler scheduler. |
| denoise | FLOAT | Denoise strength — for a tiled hires-fix keep this low (e.g. 0.3–0.5). |
| rows | INT | Number of tile rows (latent-space grid). |
| columns | INT | Number of tile columns (latent-space grid). |
| overlap | FLOAT | Overlap between tiles as a fraction of tile size (added on top of overlap_x/overlap_y). |
| overlap_x | INT | Extra horizontal overlap in pixels. |
| overlap_y | INT | Extra vertical overlap in pixels. |
| vae_decode_tiled | BOOLEAN | Decode the final full-image latent in tiles instead of one pass, so the decode can't spike VRAM (or, on Windows, spill into slow shared system memory). |
| vae_decode_tile_size | INT | Tile size in pixels for the tiled VAE decode. |
Outputs:
| Parameter | Type | Description |
|---|---|---|
| image | IMAGE | The refined image. |
Notes:
- More
rows/columnsmeans smaller per-step tiles, which lowers the peak VRAM of each model evaluation. The total number of model evaluations per step isrows × columns, so a finer grid trades a little speed for lower VRAM. - The final VAE decode is a single full-image pass and is independent of
rows/columns(the grid only tiles the per-step model call, not the VAE). If that decode pins your VRAM — on Windows it may not raise a clean out-of-memory error and instead crawl by spilling into shared system memory — enablevae_decode_tiledwith a boundedvae_decode_tile_size. - This node delegates to any
model_function_wrapperalready installed upstream, so it can stack with other wrapper-based nodes instead of overwriting them. - Upscale VAEs are supported. If the connected VAE is an upscale VAE from a pack like ComfyUI-VAE-Utils (e.g. the Wan2.1
upscale2ximage VAE), its decoder outputs extra channels (3 × k²) that must be unshuffled into ak-times larger RGB image. The node auto-detects this and decodes the same way that pack's own decode node does, so you get a correct (and larger) image instead of a broken multi-channel result. Normal VAEs are unaffected. This detection also applies whenvae_decode_tiledis enabled.