ComfyUI Node

Tiled KSampler

Sample huge images without a huge VRAM bill

By BlenderNeko·Created 3 years ago·Updated 2 years ago· 413
Tiled KSampler
  • model
  • positive
  • negative
  • latent_image
  • LATENT
seed0
tile_width512
tile_height512
tiling_strategy
steps20
cfg8.00
sampler_name
scheduler
denoise1.00

A regular KSampler runs the whole latent through the UNet in one shot, which means VRAM scales with your image size - push resolution up far enough and you OOM no matter how patient you are. Tiled KSampler sidesteps that by chopping the latent into smaller tiles and denoising those instead, so VRAM tracks tile size, not canvas size. It's how people generate or refine genuinely large images (think print-size, or a big hires-fix pass) on cards that couldn't touch that resolution otherwise.

It's a drop-in replacement for KSampler, not a full upscale pipeline - it doesn't resize anything for you. You still need something to get your latent to the target size first (a latent or pixel-space upscale), and this node does the actual sampling once it's there. It also sits behind the scenes in ComfyUI Impact-Pack's Iterative Upscale nodes, which use it as their tiled backend, so if you've used that, you've already run this code without knowing it.

How it actually tiles

The naive approach - denoise each tile independently, stitch - leaves visible seams where the tiles meet, because each tile has no idea what its neighbor is doing. This node fights that with four tiling_strategy options:

  • random - the default worth reaching for. It denoises the whole image gradually, one step at a time, randomizing tile positions between steps (alternating horizontal/vertical brick patterns with a random offset). Seams shrink toward zero as step count grows, and the README calls it "exceptionally good" at hiding them even from pure noise. The cost: extra overhead per step, and it doesn't play nice with uni-style samplers.
  • random strict - same idea, but masks border tiles instead of cropping them, which random can do unfavorably. Don't pair it with an SDE sampler.
  • padded - pads each tile with static surrounding context (splitting it into 9 sub-tiles) instead of moving tiles around. No per-step overhead, works fine with uni samplers, but you're denoising up to 4x as many tiles and it's more seam-prone than random.
  • simple - a plain static grid, denoised tile by tile. Fastest, crudest, fine when your tiles are large relative to detail and seams won't show.

If you're not sure, start with random. Switch to padded only if you need a uni sampler or the per-step randomization overhead is actually hurting you.

The inputs that matter

Model, positive/negative conditioning, latent_image, seed, steps, cfg, sampler_name and scheduler are exactly what you'd wire into a normal KSampler - take your sampler/scheduler pair from the checkpoint's card rather than guessing (DPM++ 2M Karras for SD 1.5/SDXL, Euler-family on beta or simple for flow-matching checkpoints like Flux). Denoise works the usual way too: 1.0 from an empty latent, lower (0.3–0.5) when you're adding detail on top of an existing upscaled latent rather than generating from scratch.

The two that are actually new here are tile_width and tile_height (default 512, step 64, up to 8192). 512 is a sane starting point since it matches what SD 1.5/SDXL were trained around - go bigger and you lose some of the VRAM saving that's the whole point of this node; go smaller and you multiply your tile count and runtime. Output is a single LATENT, same as any KSampler - decode it normally.

Installing it

Search "Tiled sampling for ComfyUI" in ComfyUI Manager and install, or manually: cd ComfyUI/custom_nodes && git clone https://github.com/BlenderNeko/ComfyUI_TiledKSampler, then restart. No model downloads, no heavy dependencies - it's pure tiling logic layered on stock ComfyUI sampling, so installs are quick and rarely break.

Where people get burned

The pack hasn't seen meaningful maintenance in a while, and it shows on newer architectures - there are real reports of it producing garbled, over-simplified output on Flux rather than a clean tiled result, likely a guidance/conditioning mismatch the node was never updated for. If you're on Flux or another flow-matching model, reach for Ultimate SD Upscale or a ControlNet-Tile workflow instead; this node is a solidly SD 1.5/SDXL-era tool.

Masking is the other known trap: latent noise masks and region masks don't get cropped per-tile the way you'd expect - the full mask gets applied to every tile individually instead of tiling along with the image. If your masked or inpaint-driven workflow looks wrong under this node, that's likely why; ComfyUI's Impact-Pack detailer nodes are a more reliable path for masked regional work. And remember the strategy incompatibilities above - pairing "random" with a uni sampler, or "random strict" with an SDE sampler, is asking for trouble, not a bug to report.

Categorysampling

Inputs (13)

NameTypeDefaultDescription
modelMODEL
seedINT00–18446744073709550000
tile_widthINT512256–8192
tile_heightINT512256–8192
tiling_strategyCOMBO4 options: random, random strict, padded, simple
stepsINT201–10000
cfgFLOAT8.000–100
sampler_nameCOMBO44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
schedulerCOMBO9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3
positiveCONDITIONING
negativeCONDITIONING
latent_imageLATENT
denoiseFLOAT1.000–1

Outputs (1)

NameTypeDescription
LATENTLATENT