Wan SVI/FLF Timeline Pick
The lookup table that tells each loop iteration which mode it's in
- timeline
- is_flf
- is_svi
- motion_latent_count
- use_prev_samples
- use_end_frame
- end_overshoot_slots
- end_lock_slots
- prev_skip_last_slots
- latent_refresh
- mode
- report
IAMCCS_WanSviFlfTimeline builds the SVI/FLF plan; this node is what you actually use it with. Wan SVI/FLF Timeline Pick takes the timeline plus the current loop index and answers the question the sampler chain needs answered this iteration: is this an FLF generation or a plain SVI one, and what settings does that imply?
What it does
Two inputs: timeline (from the Timeline node) and generation_index (your loop counter, zero-based, lazy so it only recomputes when the index actually changes). Every other widget on the node is an output, not a knob:
- is_flf and is_svi - 1/0 flags for the current generation's mode. The inverse pair is handy for feeding a switch node.
- motion_latent_count - how many prev-sample latent slots to carry as the motion reference this iteration (the Timeline node picked the right count for the mode).
- use_prev_samples - whether to wire in
prev_samplesat all (false on generation 0). - use_end_frame - whether this generation hard-locks an end frame. If true, you know to encode and connect your end image.
- end_overshoot_slots, end_lock_slots, prev_skip_last_slots - the FLF tail-handling values for this generation.
- latent_refresh - the stabilization strength.
- mode - the string
"flf"or"svi", if you prefer string routing. - report - a one-line summary of everything above for this index.
How it works
It looks up the current index in the timeline's segment list (clamping to the last segment if you somehow overrun it) and returns that segment's precomputed settings. All the logic - which generations are FLF, which counts to use - was decided up front by the Timeline node, so Pick is a dumb, fast lookup. That separation is the point: plan once, query cheaply a hundred times.
Where it fits
Inside the loop, wire the loop counter into both the Timeline Pick's generation_index and your motion node's length/motion inputs. Then use use_end_frame and end_lock_slots to decide whether the end-frame encoder runs this iteration, and is_flf to pick between SVI-continuity and FLF-anchored presets on the motion node. It turns a hand-built spaghetti of switches into one lookup.
Installing it
Part of IAMCCS-nodes. ComfyUI Manager (search "IAMCCS"), or:
cd ComfyUI/custom_nodes
git clone https://github.com/IAMCCS/IAMCCS-nodes.git
Restart after. No model files, no dependencies beyond the pack.
Common issues
If the output never matches what you expect, you're almost certainly off by one on the index - everything here is zero-based, so generation "4" is the fifth chunk. And if you wire Pick but forget the Timeline node entirely, you'll get a type error at validation because there's no timeline to look up. The pair ships as a pair.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| timeline | IAMCCS_WAN_SVI_TIMELINE | — | |
| generation_index | INT | 00–100000 | — |
Outputs (11)
| Name | Type | Description |
|---|---|---|
| is_flf | INT | — |
| is_svi | INT | — |
| motion_latent_count | INT | — |
| use_prev_samples | BOOLEAN | — |
| use_end_frame | BOOLEAN | — |
| end_overshoot_slots | INT | — |
| end_lock_slots | INT | — |
| prev_skip_last_slots | INT | — |
| latent_refresh | FLOAT | — |
| mode | STRING | — |
| report | STRING | — |