Nodes/IAMCCS-nodes/Wan SVI/FLF Timeline
ComfyUI Node

Wan SVI/FLF Timeline

Decide which generations lock to a last frame, and let SVI run the rest

By IAMCCS·Created 11 months ago·Updated 7 days ago· 113
Wan SVI/FLF Timeline
    • timeline
    • generation_count
    • flf_count
    • report
    generation_count16
    flf_every_n4
    flf_every_start4
    manual_flf_generations
    manual_modeadd_to_every_n
    include_generation_0false
    svi_motion_latent_count1
    flf_motion_latent_count1
    flf_end_overshoot_slots1
    flf_end_lock_slots1
    flf_prev_skip_last_slots1
    latent_refresh0.50

    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 is add_to_every_n (default) or manual_only to 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_samples to 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.

    CategoryIAMCCS/Wan

    Inputs (12)

    NameTypeDefaultDescription
    generation_countINT161–100000
    flf_every_nINT40–100000
    flf_every_startINT40–100000
    manual_flf_generationsSTRINGComma/space list and ranges, e.g. 4, 9, 13-15. These are generation indexes, zero-based.
    manual_modeCOMBOadd_to_every_n2 options: add_to_every_n, manual_only
    include_generation_0BOOLEANfalse
    svi_motion_latent_countINT10–16
    flf_motion_latent_countINT10–16
    flf_end_overshoot_slotsINT10–8
    flf_end_lock_slotsINT10–16
    flf_prev_skip_last_slotsINT10–16
    latent_refreshFLOAT0.500–1

    Outputs (4)

    NameTypeDescription
    timelineIAMCCS_WAN_SVI_TIMELINE
    generation_countINT
    flf_countINT
    reportSTRING