Nodes/ComfyUI_VideoChunkTools/Wan Chunked I2V Sampler ♾️
ComfyUI Node

Wan Chunked I2V Sampler ♾️

All-in-one chunked video generator for Wan I2V models. Set total_frames and chunk_frames — the node handles everything: encode → sample → decode → extract reference → repeat. Supports single-pass (one model) or two-pass (connect model_b). FLF (First-Last-Frame): Connect an end_image to make the video transition toward a target end frame. For multi-chunk videos, set end_blend_chunks (e.g. 9–17) for a smooth crossfade overlap. Uses the proven concat approach: each chunk's first frame naturally matches the previous chunk's last frame, so we just drop it and concatenate. Requires: ComfyUI-WanVideoWrapper

By gregtee2·Created 6 months ago·Updated 6 months ago· 2
Wan Chunked I2V Sampler ♾️
  • model
  • vae
  • start_image
  • model_b
  • text_embeds
  • text_embed_sequence
  • clip_embeds
  • feta_args
  • context_options
  • end_image
  • video
  • total_frames
  • chunks_generated
total_frames161
chunk_frames81
width832
height480
keep_proportioncrop
crop_positioncenter
steps8
cfg2.00
shift11.00
seed0
force_offloadtrue
schedulereuler
enable_vae_tilingfalse
split_step4
cfg_b1.00
noise_aug_strength0.00
start_latent_strength1.00
end_latent_strength1.00
riflex_freq_index0
tile_x272
tile_y272
tile_stride_x144
tile_stride_y128
end_blend_chunks0
CategoryVideoChunkTools

Inputs (34)

NameTypeDefaultDescription
modelWANVIDEOMODELWan I2V model (2.1 or 2.2). Runs all steps in single-pass. In two-pass mode, runs the first steps (0 → split_step).
vaeWANVAEWan VAE model
start_imageIMAGEReference image for the first chunk
total_framesINT1615–9999Total frames to generate. Output may be slightly more (rounded to fill the last chunk), then trimmed.
chunk_framesINT815–241Frames per chunk. Auto-normalized to Wan's 4n+1 rule (5, 9, 13, … 77, 81, 85 …).
widthINT832128–2048Output video width in pixels.
heightINT480128–2048Output video height in pixels.
keep_proportionCOMBOcropHow to resize the input images to match the target width/height.
crop_positionCOMBOcenterWhere to crop or pad the image.
stepsINT81–100Total denoising steps.
cfgFLOAT2.000–30CFG guidance scale. In two-pass mode this applies to the first pass only.
shiftFLOAT11.000–1000Scheduler shift parameter.
seedINT00–18446744073709550000Random seed. Same seed used for every chunk — variation comes from different reference images.
force_offloadBOOLEANtrueOffload model to CPU after each sampling pass. Highly recommended.
schedulerCOMBOeulerNoise scheduler algorithm.
enable_vae_tilingBOOLEANfalseEnable VAE tiling for lower-VRAM decode. May introduce tile seam artifacts.
model_boptWANVIDEOMODELOptional 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_stepoptINT41–99Two-pass only: model runs steps 0 → split_step, model_b runs split_step → end. Ignored in single-pass.
cfg_boptFLOAT1.000–30Two-pass only: CFG for the second pass (model_b). Ignored in single-pass.
text_embedsoptWANVIDEOTEXTEMBEDSText conditioning from WanVideoTextEncode. Applied to ALL chunks uniformly.
text_embed_sequenceoptTEXT_EMBED_SEQUENCEPer-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_embedsoptWANVIDIMAGE_CLIPEMBEDSOptional CLIP vision embeddings from WanVideoClipVisionEncode.
feta_argsoptFETAARGSFETA arguments. Recommended: weight=2, start=0, end=1.
context_optionsoptWANVIDCONTEXTContext windowing options. In two-pass mode only applied to the first pass (model).
noise_aug_strengthoptFLOAT0.000–1Noise augmentation for I2V encoding. 0 = no augmentation.
start_latent_strengthoptFLOAT1.000–1Strength of the start image in latent space.
end_latent_strengthoptFLOAT1.000–1FLF 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_indexoptINT00–1000RIFLEX frequency index. 0 = disabled.
tile_xoptINT27240–4096VAE decode tile width (only when tiling enabled).
tile_yoptINT27240–4096VAE decode tile height (only when tiling enabled).
tile_stride_xoptINT14432–2040VAE decode tile stride X (only when tiling enabled).
tile_stride_yoptINT12832–2040VAE decode tile stride Y (only when tiling enabled).
end_imageoptIMAGEOptional 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_chunksoptINT00–40FLF 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)

NameTypeDescription
videoIMAGE
total_framesINT
chunks_generatedINT