LTX Tiled Sampler (Model Patch)
Push LTX past its training resolution without the seams and temporal ghosting
- model
- MODEL
LTX-Video is the speed tier of local video generation - seconds per clip where Wan takes minutes - and that speed tempts everyone into pushing resolution and length way past where the model was trained. The quality degrades in predictable ways: long-context sampling falls apart, seams appear, and temporal coherence gets wobbly. LtxTiledSamplerPatch is a MODEL → MODEL patch that attacks this with per-step MultiDiffusion tiling along the temporal, height, and width axes, and it works with the vanilla SamplerCustomAdvanced - no custom sampler required.
The lineage is worth knowing because it's the honest kind of provenance. The trapezoidal blend window, the 2×2 spatial / 1 temporal tiling geometry, and the causal-VAE coordinate conventions all follow Lightricks' own official LTX tiling code (ltx_core/tiling.py). The per-tile guide handling borrows from TenStrip's 10S Nodes investigation into long-context degradation, with the coordinate and grid-mask logic reworked - the author's note says that original had correctness bugs in it.
How it works
The patch installs itself on the model's model_function_wrapper slot. ComfyUI calls that wrapper for every model evaluation inside the sampler - every sigma step, cond and uncond - and each call gets split into overlapping tiles. Each tile runs at a training-distribution token count, then the predictions are blended back with trapezoidal windows whose weights sum to exactly 1.0 at every position (there's a debug check for exactly that).
Because blending happens at every step, all tiles share a single denoising trajectory. That's the whole trick - tiles never diverge into independent schedules, which is what causes the temporal ghosting you get from naive per-tile sampling. Guide conditioning (keyframe_idxs / guide_attention_entries) and denoise_mask are cropped per tile automatically, so ICLoRA and guide workflows keep working.
The inputs that matter
tiles_h/tiles_w- spatial tiles, default 2. That's the official LTX Stage-2 geometry. Set either to 1 to disable that axis.overlap_h/overlap_w- overlap in latent units, default 6 (≈48px at the 8× spatial VAE). More overlap = smoother seams, more compute.tiles_t- temporal tiles, default 1, and the README recommends leaving it off for most clips. Set it above 1 only when you're sampling long clips that won't fit otherwise; temporal tiling is where ghosting risk lives.bypass_tiling- return the model unpatched, i.e. single-pass. Useful for A/B testing whether tiling is actually buying you anything.debug- prints the tile layout, the blend-weight sanity check, and per-tile guide info to the console. Turn this on the first time you run it.
Output is a MODEL. Wire it after your LoRA / ICLoRA loaders and before the guider:
… → LTX ICLoRA Loader → LTX Tiled Sampler (Model Patch) → CFGGuider → SamplerCustomAdvanced
Installing
Ships 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, no model files.
The one gotcha
Apply this patch last in any chain of model patches. It claims the model_function_wrapper slot - an existing wrapper gets chained through, so it composes with the patch before it, but any patch after it that overwrites that slot without chaining will silently drop your tiling. If your tiling just stops working one day, reorder your patches.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| tiles_h | INT | 21–8 | Tiles along height (H). Official LTX Stage-2 default: 2. Set 1 to disable. |
| tiles_w | INT | 21–8 | Tiles along width (W). Official LTX Stage-2 default: 2. Set 1 to disable. |
| overlap_h | INT | 60–32 | Overlap in latent units between H tiles. Official LTX default: 6 (≈48 px at 8× VAE). |
| overlap_w | INT | 60–32 | Overlap in latent units between W tiles. Official LTX default: 6 (≈48 px at 8× VAE). |
| tiles_topt | INT | 11–8 | Tiles along the temporal (frames) axis. 1 disables temporal tiling (recommended for most clips). Official Stage-2 uses 2. |
| overlap_topt | INT | 80–32 | Overlap in latent frames between temporal tiles. Official LTX default: 8. |
| bypass_tilingopt | BOOLEAN | false | Return the model unpatched — single-pass sampling. |
| debugopt | BOOLEAN | false | Print tile layout, blend-weight sanity check, and per-tile guide-conditioning info to the console. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |