Wan SVI/FLF Timeline
Decide which generations lock to a last frame, and let SVI run the rest
- timeline
- generation_count
- flf_count
- report
SVI gave Wan long video, and FLF gave it planned long video. Wan SVI/FLF Timeline is the node that decides which is which, generation by generation, so you don't have to hand-pick it inside every loop iteration.
Quick background if you're new here: SVI (Stable Video Infinity) is the error-recycling LoRA pair that broke Wan's five-second ceiling - it taught Wan 2.2 to keep going for 20+ seconds. FLF (first/last frame) is the IAMCCS addition on top that hard-locks the start and end frames so a long take lands where you want it to. Pure SVI is continuous but loose; pure FLF everywhere is over-constrained. The winning pattern is mostly SVI continuation with occasional FLF anchors, and that's exactly what this node plans.
What it does
You tell it how many generations the loop will run and how often to inject an FLF anchor:
- generation_count (16) - total generations in the loop.
- flf_every_n (4) and flf_every_start (4) - every N-th generation is an FLF generation, starting from this index. Default: generations 4, 8, 12 are FLF anchors.
- manual_flf_generations - a text list for the stubborn ones:
4, 9, 13-15(zero-based). manual_mode isadd_to_every_n(default) ormanual_onlyto ignore the every-N pattern entirely. - include_generation_0 (off) - generation 0 is normally never marked FLF; flip this if your first chunk needs an end lock too.
Then the per-mode tuning. Because FLF generations and SVI generations want different settings, you get separate knobs:
- svi_motion_latent_count (1) vs flf_motion_latent_count (1) - how many temporal latent slots from
prev_samplesto carry as motion reference in each mode. - flf_end_overshoot_slots (1) - extends the generation window past the visible clip so the end frame converges without freezing on it.
- flf_end_lock_slots (1) - how many final latent slots hard-lock to the end frame.
- flf_prev_skip_last_slots (1) - drop the last N prev-sample slots before extracting the motion tail, which stops a stale scene from crossfading into the new one.
- latent_refresh (0.5) - moment-stabilization strength that matches the motion tail's mean/contrast to the anchor, fighting the color drift SVI is known for.
Outputs are the timeline (IAMCCS_WAN_SVI_TIMELINE), plus generation_count, flf_count (how many generations ended up as FLF anchors), and a report string that lists exactly which indexes are FLF - read that once and you'll know whether the plan matches your intent.
How it works
The node computes a set of FLF generation indexes (every-N starting at flf_every_start, plus manual additions, minus generation 0 unless asked), then builds one segment record per generation tagging it flf or svi with its own motion counts and lock settings. Nothing samples anything - it's a plan, exactly like a shot list, and it hands that plan to IAMCCS_WanSviFlfTimelinePick inside the loop to query per-iteration.
Installing it
Ships in IAMCCS-nodes. ComfyUI Manager (search "IAMCCS"), or:
cd ComfyUI/custom_nodes
git clone https://github.com/IAMCCS/IAMCCS-nodes.git
Restart after. The node itself needs no model files - but to use the plan you still need the SVI Pro LoRAs (the HIGH/LOW rank-128 pair from Kijai's WanVideo_comfy) on a Wan 2.2 I2V model, because that's what the whole SVI/FLF dance is built on.
Common issues
The classic confusion is zero-based indexing - 13-15 means generations 13, 14 and 15, not 14–16. And if your FLF anchors never seem to fire, check include_generation_0 and flf_every_start; the default start of 4 means generations 0–3 are pure SVI by design. That's the feature working as intended.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| generation_count | INT | 161–100000 | — |
| flf_every_n | INT | 40–100000 | — |
| flf_every_start | INT | 40–100000 | — |
| manual_flf_generations | STRING | Comma/space list and ranges, e.g. 4, 9, 13-15. These are generation indexes, zero-based. | |
| manual_mode | COMBO | add_to_every_n | 2 options: add_to_every_n, manual_only |
| include_generation_0 | BOOLEAN | false | — |
| svi_motion_latent_count | INT | 10–16 | — |
| flf_motion_latent_count | INT | 10–16 | — |
| flf_end_overshoot_slots | INT | 10–8 | — |
| flf_end_lock_slots | INT | 10–16 | — |
| flf_prev_skip_last_slots | INT | 10–16 | — |
| latent_refresh | FLOAT | 0.500–1 | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| timeline | IAMCCS_WAN_SVI_TIMELINE | — |
| generation_count | INT | — |
| flf_count | INT | — |
| report | STRING | — |