Nodes/IAMCCS-nodes/Wan Prompt Loop Info
ComfyUI Node

Wan Prompt Loop Info

Before you loop 10 WAN prompts, know how many frames and minutes that is

By IAMCCS·Created 11 months ago·Updated 7 days ago· 113
Wan Prompt Loop Info
    • prompt_count
    • total_generations
    • continuation_generations
    • total_frames
    • total_duration_s
    • report
    text
    separator_modeauto
    first_visible_frames81
    continuation_visible_frames81
    fps16.00
    bootstrap_outside_looptrue

    Chained Wan generation is the standard way to get past the 5-second clip ceiling, and it's a math trap: every prompt in your loop becomes a generation, every generation has a frame count, and the total runtime sneaks up on you. IAMCCS_WanPromptLoopInfo is the pre-flight check - paste your prompt bank, tell it your frame budget and FPS, and it tells you how many generations, frames, and seconds the whole loop will cost.

    What it computes

    text is your prompt bank - multiple prompts, split according to separator_mode: auto (it figures out the format), indexed, blank_line, or line. Then:

    • first_visible_frames (default 81) - frames for the bootstrap generation.
    • continuation_visible_frames (default 81) - frames for each follow-on generation.
    • fps (default 16 - the Wan-native default) - for the duration math.
    • bootstrap_outside_loop (default true) - if true, the first prompt is the bootstrap and the rest are continuations: continuation_generations = prompt_count - 1 and total_frames = first + (count-1) * continuation. If false, every prompt is a continuation.

    Outputs: prompt_count, total_generations, continuation_generations, total_frames, total_duration_s, and a one-line report that summarizes everything - handy to drop into a text preview.

    The honest use

    This is a planning node for the pack's Wan loop workflows (it lives in the same file family as IAMCCS_WanLongPlanner). The value is knowing the scale before you queue: 10 prompts at 81 frames and 16fps is roughly 50 seconds of video and, depending on your GPU and model, a long wall-clock time. Seeing total_duration_s and total_frames up front is how you decide to cut the bank from 10 prompts to 4. It does exactly the arithmetic - no sampling, no magic - so the only real risk is feeding it a separator format it doesn't parse the way you expect, which is what the report's prompt_count is for: glance at it and you'll know instantly if the split went wrong.

    Install

    Part of IAMCCS-nodes:

    • ComfyUI Manager → search "IAMCCS" → install → restart.
    • Or:
    cd ComfyUI/custom_nodes
    git clone https://github.com/IAMCCS/IAMCCS-nodes.git
    

    Restart ComfyUI. Requirements: ComfyUI ≥ 0.3.0, Python ≥ 3.12, Torch ≥ 2.8. Pure math, no models.

    CategoryIAMCCS/Wan

    Inputs (6)

    NameTypeDefaultDescription
    textSTRING
    separator_modeCOMBOauto4 options: auto, indexed, blank_line, line
    first_visible_framesINT811–8192
    continuation_visible_framesINT811–8192
    fpsFLOAT16.000.001–240
    bootstrap_outside_loopBOOLEANtrue

    Outputs (6)

    NameTypeDescription
    prompt_countINT
    total_generationsINT
    continuation_generationsINT
    total_framesINT
    total_duration_sFLOAT
    reportSTRING