Wan Chunked I2V Sampler ♾️
Wan Chunked I2V Sampler ♾️ — long Wan videos from one node, no hand-chaining
- model
- vae
- start_image
- model_b
- text_embeds
- text_embed_sequence
- clip_embeds
- feta_args
- context_options
- end_image
- video
- total_frames
- chunks_generated
Wan's native context is 81 frames - about five seconds at 16fps - and anything longer used to mean hand-chaining samplers: generate a chunk, decode it, grab the last frame, feed it back in as the reference, repeat, stitch. Tedious, error-prone, and the frame-count arithmetic (the 4n+1 thing) would bite you at the end. This node collapses that whole loop into a single box. You set total_frames and chunk_frames, connect your model, VAE, and start image, and it internally runs encode → sample → decode → extract reference → repeat until the timeline is done, then concatenates everything into one continuous video.
It's the flagship of the VideoChunkTools pack, and it fits a real 2026 pattern: the "chunking moved into a single node" trend (SCAIL-2 Infinity, Bernini Infinity, scail-auto-extend all did the same thing for their models). The honest caveat that applies to all of them applies here too - the loop is hidden, the 81-frame window isn't, and identity drift across chunk boundaries is still the failure mode. What you get is ergonomics, not magic. But it's a big ergonomics win.
How it works
Under the hood it calls Kijai's WanVideoWrapper nodes (WanVideoEncode, WanVideoSampler, WanVideoDecoder) from ComfyUI's global node registry - lazily, so the pack still loads even if you haven't installed the wrapper. The join strategy is the "concat approach": because each chunk is conditioned on the previous chunk's last frame as its reference, the new chunk's first frame matches it almost exactly, so the sampler just drops that first frame and concatenates. No blending, zero artifacts from a dissolve you don't need.
The inputs that matter
total_frames/chunk_frames- your target length and the window size. Chunk frames auto-normalize to Wan's4n+1rule (81 → 81, 82 → 81), so you can't trip the trap. Output may overshoot to fill the last chunk, then gets trimmed.start_image- the reference for chunk 1.steps(default 8),cfg(default 2),shift(default 11),scheduler(defaulteuler) - the standard Wan sampling knobs, in line with the distilled/LoRA-friendly settings the community runs.seed- one seed for every chunk. Variation comes from the changing reference images, not from reseeding. Set it once and keep it if you're iterating.force_offload(default on) - offloads the model to CPU between sampling passes. Keep it on unless you're swimming in VRAM; Wan is a 14B model and offloading is how mid-range cards survive multi-chunk runs.
The interesting optional inputs: model_b + split_step + cfg_b give two-pass sampling (first model handles steps 0→split, second finishes - the classic way to put a speed LoRA on the low-noise pass only). end_image enables FLF (first-last-frame): one image pulls the final frame toward a target, or a batch of images distributes as keyframes across the last chunks. end_blend_chunks (try 9–17) crossfades the FLF boundary instead of hard-cutting. And text_embed_sequence from ChainTextEmbeds swaps in per-chunk prompts, which overrides the uniform text_embeds.
Outputs
video (the joined IMAGE), total_frames (INT), and chunks_generated (INT) - the last is handy for knowing whether your prompt chain actually covered every chunk.
Installing
This node needs ComfyUI-WanVideoWrapper:
cd ComfyUI/custom_nodes
git clone https://github.com/kijai/ComfyUI-WanVideoWrapper.git
cd ComfyUI/custom_nodes
git clone https://github.com/gregtee2/ComfyUI_VideoChunkTools.git
Restart ComfyUI. The pack itself has no pip requirements; the wrapper is the heavy one (and brings the model files - Wan 2.2 14B needs serious VRAM, 12GB+ with GGUF or offloading, or use the 5B on 8GB). If you haven't installed the wrapper, the sampler will fail with a clear "requires ComfyUI-WanVideoWrapper" error while the rest of the pack keeps working.
Troubleshooting: if your first run OOMs, drop resolution to 832×480, enable force_offload, and consider enable_vae_tiling (it costs you some decode quality). If seams appear between chunks, that's the drift problem, not the concat - per-chunk prompting and a well-chosen end_blend_chunks help more than any blend curve will.
Inputs (34)
| Name | Type | Default | Description |
|---|---|---|---|
| model | WANVIDEOMODEL | Wan I2V model (2.1 or 2.2). Runs all steps in single-pass. In two-pass mode, runs the first steps (0 → split_step). | |
| vae | WANVAE | Wan VAE model | |
| start_image | IMAGE | Reference image for the first chunk | |
| total_frames | INT | 1615–9999 | Total frames to generate. Output may be slightly more (rounded to fill the last chunk), then trimmed. |
| chunk_frames | INT | 815–241 | Frames per chunk. Auto-normalized to Wan's 4n+1 rule (5, 9, 13, … 77, 81, 85 …). |
| width | INT | 832128–2048 | Output video width in pixels. |
| height | INT | 480128–2048 | Output video height in pixels. |
| keep_proportion | COMBO | crop | How to resize the input images to match the target width/height. |
| crop_position | COMBO | center | Where to crop or pad the image. |
| steps | INT | 81–100 | Total denoising steps. |
| cfg | FLOAT | 2.000–30 | CFG guidance scale. In two-pass mode this applies to the first pass only. |
| shift | FLOAT | 11.000–1000 | Scheduler shift parameter. |
| seed | INT | 00–18446744073709550000 | Random seed. Same seed used for every chunk — variation comes from different reference images. |
| force_offload | BOOLEAN | true | Offload model to CPU after each sampling pass. Highly recommended. |
| scheduler | COMBO | euler | Noise scheduler algorithm. |
| enable_vae_tiling | BOOLEAN | false | Enable VAE tiling for lower-VRAM decode. May introduce tile seam artifacts. |
| model_bopt | WANVIDEOMODEL | Optional second model for two-pass sampling. Connect this to split denoising across two models (e.g. different LoRA weights). Leave disconnected for single-pass. | |
| split_stepopt | INT | 41–99 | Two-pass only: model runs steps 0 → split_step, model_b runs split_step → end. Ignored in single-pass. |
| cfg_bopt | FLOAT | 1.000–30 | Two-pass only: CFG for the second pass (model_b). Ignored in single-pass. |
| text_embedsopt | WANVIDEOTEXTEMBEDS | Text conditioning from WanVideoTextEncode. Applied to ALL chunks uniformly. | |
| text_embed_sequenceopt | TEXT_EMBED_SEQUENCE | Per-chunk text conditioning from ChainTextEmbeds. Chunk 1 gets embed_1, chunk 2 gets embed_2, etc. Last embed repeats for extra chunks. Overrides text_embeds when connected. | |
| clip_embedsopt | WANVIDIMAGE_CLIPEMBEDS | Optional CLIP vision embeddings from WanVideoClipVisionEncode. | |
| feta_argsopt | FETAARGS | FETA arguments. Recommended: weight=2, start=0, end=1. | |
| context_optionsopt | WANVIDCONTEXT | Context windowing options. In two-pass mode only applied to the first pass (model). | |
| noise_aug_strengthopt | FLOAT | 0.000–1 | Noise augmentation for I2V encoding. 0 = no augmentation. |
| start_latent_strengthopt | FLOAT | 1.000–1 | Strength of the start image in latent space. |
| end_latent_strengthopt | FLOAT | 1.000–1 | FLF only: Strength of the end image conditioning in latent space. Controls how strongly the last chunk is pulled toward the end image. Only effective when end_image is connected. |
| riflex_freq_indexopt | INT | 00–1000 | RIFLEX frequency index. 0 = disabled. |
| tile_xopt | INT | 27240–4096 | VAE decode tile width (only when tiling enabled). |
| tile_yopt | INT | 27240–4096 | VAE decode tile height (only when tiling enabled). |
| tile_stride_xopt | INT | 14432–2040 | VAE decode tile stride X (only when tiling enabled). |
| tile_stride_yopt | INT | 12832–2040 | VAE decode tile stride Y (only when tiling enabled). |
| end_imageopt | IMAGE | Optional target image for the last frame — enables FLF (First-Last-Frame) mode. If a batch of images is provided, they will be distributed as target keyframes across the chunks (e.g., 3 images for a 3-chunk video). | |
| end_blend_chunksopt | INT | 00–40 | FLF only: Number of FRAMES to crossfade at the FLF boundary. The last chunk (with end_image) overlaps with the previous chunk by this many frames, and a smooth alpha ramp blends between them. 0 = hard cut (no crossfade). Try 9–17 for smooth transitions (~0.5–1 sec at 16fps). The last chunk is automatically enlarged to the next valid 4n+1 size to accommodate the overlap. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| video | IMAGE | — |
| total_frames | INT | — |
| chunks_generated | INT | — |