Nodes/MagoNodes/WAN Tiled Sampler
ComfyUI Node

WAN Tiled Sampler

WAN above its training resolution without the hue drift — a tiled KSamplerAdvanced replacement

By MagoStudio·Created 4 months ago·Updated 17 days ago· 6
WAN Tiled Sampler
  • model
  • positive
  • negative
  • latent_image
  • LATENT
add_noise
noise_seed0
steps20
cfg1.0
sampler_name
scheduler
start_at_step0
end_at_step10000
return_with_leftover_noise
tiles_h2
tiles_w2
overlap_h25
overlap_w25
scale_schedule
bypass_tilingfalse
reference_latent_fulltrue
debugfalse

If you've generated WAN at 1080p and wondered why the colors drifted, why everything looks washed out, or why the conditioning seems to have evaporated - that's not a bad seed. WAN models are trained at specific spatial resolutions, and sampling way outside that range pushes token counts and positional encodings off the rails. The community's standard answer is "generate at 480p, upscale later." WanTiledSampler is the "no, generate at the target resolution directly" answer: a drop-in replacement for KSamplerAdvanced that adds per-step MultiDiffusion spatial tiling and a coarse-to-fine multiscale schedule, built specifically for WAN 2.1 / 2.2 video.

It's the flagship node of the MagoNodes pack, and it's genuinely two features stacked. Tiling solves the spatial problem; the multiscale schedule solves the temporal one. You want both, so it's worth understanding what each actually does.

How it works

Tiling. Each denoising step is split into overlapping spatial tiles, the model runs each tile at a training-distribution token count, and the predictions are blended back into one full-resolution estimate before the sampler takes its step. Because the blend happens at every sigma step, all tiles ride a single denoising trajectory - content never diverges between tiles. Tiling is spatial only; temporal frames are never split, so causal temporal attention stays intact. This works great for V2V, where the control video pins motion per tile.

Multiscale (the I2V fix). Tiling alone can't fix I2V, because each tile decides its own motion from local context and the tiles drift apart over time. The scale_schedule input fixes that: during early, high-noise steps - when global motion and layout get decided - the whole frame is run downscaled in a single pass; then resolution ramps up and tiling takes over for detail. WAN derives its positional encodings from the latent's spatial size, so a smaller latent automatically brings tokens and positions back in-distribution, and one shared low-res pass keeps motion globally coherent.

One subtle bit the author got right: the noisy latent is downscaled by subsampling, not averaging. Averaging collapses the variance of i.i.d. noise, which would hand the model a latent whose noise level no longer matches the timestep and produce garbage. Subsampling keeps unit-variance noise. The conditioning tensors are clean signal, so those downscale with antialiased area.

The inputs that matter

It's a KSamplerAdvanced clone, so you get all the familiar stuff: model, positive, negative, latent_image, steps, cfg, sampler_name, scheduler, noise_seed, start_at_step / end_at_step, add_noise, return_with_leftover_noise. The rest are the new controls:

  • tiles_h / tiles_w - spatial tiles, default 2×2. 1 disables that axis.
  • overlap_h / overlap_w - overlap as a percentage of tile size (0–50%), default 25. The guidance: 12% for static scenes, 25% recommended, 50% for maximum continuity at ~2× compute.
  • scale_schedule - the multiscale plan, e.g. {0:25, 10:50, 20:100}. Empty = always full-res. The pack's recommended I2V recipe is a gentle ramp: {0:50, 15:100}.
  • bypass_tiling - skip tiling entirely (unless a schedule is set).
  • reference_latent_full - keep it on for I2V; it passes the full reference frame to every tile as global context instead of cropping it.

Output is LATENT, straight into a VAE decode. Note the cfg default of 1 - WAN distilled models run at cfg 1, so this node starts where you'd end up anyway.

Installing

In the MagoStudio/ComfyUI-MagoNodes pack: ComfyUI Manager → search "ComfyUI-MagoNodes", or

cd ComfyUI/custom_nodes
git clone https://github.com/MagoStudio/ComfyUI-MagoNodes

Restart ComfyUI. No extra dependencies.

Where people get burned

  • More tiles = lower per-tile memory but more model evals per step. Start 2×2 and only go up if you still see drift or OOM.
  • The schedule's step indices are relative to the sampled range, so they respect start_at_step / end_at_step.
  • In a WAN 2.2 high/low-noise two-sampler setup, each node has its own schedule and step indices restart at 0 per pass. The latent handed between passes is always full-res - the downscaling lives inside each model eval and never persists.
  • Turn on debug for your first run - it prints the tile layout and per-step decisions, which is the fastest way to confirm tiling is actually firing.
CategoryMago Nodes/Sampling

Inputs (21)

NameTypeDefaultDescription
modelMODEL
add_noiseCOMBO2 options: enable, disable
noise_seedINT00–18446744073709550000
stepsINT201–10000
cfgFLOAT1.00–100Classifier-Free Guidance scale. WAN distilled models typically use cfg=1.
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
start_at_stepINT00–10000
end_at_stepINT100000–10000
return_with_leftover_noiseCOMBO2 options: disable, enable
tiles_hINT21–8Number of spatial tiles along the height axis. Set 1 to disable height tiling.
tiles_wINT21–8Number of spatial tiles along the width axis. Set 1 to disable width tiling.
overlap_hINT250–50Overlap between height tiles as a percentage of tile height (0–50%). 25% = one quarter of each tile overlaps its neighbour. Larger values reduce seam artifacts from cross-tile motion at the cost of more compute per step.
overlap_wINT250–50Overlap between width tiles as a percentage of tile width (0–50%). 25% = one quarter of each tile overlaps its neighbour.
scale_scheduleoptSTRINGMultiscale (coarse-to-fine) schedule mapping step → resolution %. e.g. {0:25, 10:50, 20:100} runs the WHOLE frame downscaled to 25% for steps 0–9, 50% for 10–19, then full-res from 20. Values are held until the next key. While scale < 100% the frame is evaluated in a single pass (tiling is skipped) so global motion stays coherent — the key fix for I2V drift. Empty = always 100%.
bypass_tilingoptBOOLEANfalseSkip tiling entirely — equivalent to plain KSamplerAdvanced (unless a scale_schedule is set).
reference_latent_fulloptBOOLEANtrueWhen enabled, the full reference frame is passed to every tile instead of cropping it to the tile region. Useful for I2V workflows: the reference tokens are appended to the sequence so there is no size constraint, and the full image gives each tile global scene context.
debugoptBOOLEANfalsePrint tile layout, blend weight sanity check, per-step scale/tile decisions, and conditioning slice info.

Outputs (1)

NameTypeDescription
LATENTLATENT