Nodes/IAMCCS-nodes/Wan Prompt Phase Planner
ComfyUI Node

Wan Prompt Phase Planner

Tiny node that tells your prompt bank which phase you're in

By IAMCCS·Created 11 months ago·Updated 8 days ago· 113
Wan Prompt Phase Planner
    • active_prompt_slot
    • phase_index
    • report
    segment_index0
    modethree_phase
    phase1_last_segment0
    phase2_last_segment1

    Long videos have structure - setup, action, payoff - and your prompts should follow it. IAMCCS_WanPromptPhasePlanner ("Wan Prompt Phase Planner") is the smallest possible node for that job: give it a segment_index and a mode, and it tells you which prompt slot and which phase the current segment belongs to.

    It outputs three things: active_prompt_slot (which prompt in your bank to use), phase_index (which phase you're in), and a report string. That's the whole node. It's the "decision" half of a pairing where IAMCCS_WanIndexedPromptEncode is the "action" half - the encoder can do this selection internally with its own modes, but if you want the phase decision as plain INTs to drive other nodes (a lighting switch, a different sampler profile, a LoRA range), this is the node that hands it over.

    The modes

    • single - always phase 0, always prompt slot 0. Stable, boring, useful as a baseline.
    • three_phase - segments up to phase1_last_segment are phase 0 / slot 0; up to phase2_last_segment are phase 1 / slot 1; everything after is phase 2 / slot 2. The classic three-act structure, inclusive boundaries.
    • cyclic_3 - cycles 0, 1, 2, 0, 1, 2... with the segment index. For intercut scenes where the same three prompt types repeat.

    The phase1_last_segment and phase2_last_segment boundaries are inclusive - a value of 2 covers segments 0, 1, and 2. Same off-by-one trap as the encoder's three-phase mode, so check the report on your first few iterations.

    Why you'd bother

    Because it keeps the phase logic as data. Rather than hardcoding "segment < 3 means slot 0" inside a pile of switch nodes, you put the boundary numbers here and wire the outputs wherever they're needed. It's genuinely thin - a thin-utility node in the best sense - and it earns its place in a shotboard loop where the same boundaries drive prompts, motion settings, and LoRA ranges simultaneously.

    Install

    Standard IAMCCS-nodes:

    cd ComfyUI/custom_nodes
    git clone https://github.com/IAMCCS/IAMCCS-nodes.git
    

    or ComfyUI Manager → search "IAMCCS" → restart. No models, no dependencies. ComfyUI ≥ 0.3.0, Python ≥ 3.12, Torch ≥ 2.8.

    Honestly, if you're only changing prompts per segment, IAMCCS_WanIndexedPromptEncode's built-in modes do this for free and you don't need this node at all. Reach for WanPromptPhasePlanner when more than one system needs to know the current phase - that's the scenario it was built for.

    CategoryIAMCCS/Wan

    Inputs (4)

    NameTypeDefaultDescription
    segment_indexINT00–100000
    modeCOMBOthree_phase3 options: single, three_phase, cyclic_3
    phase1_last_segmentINT00–100000
    phase2_last_segmentINT10–100000

    Outputs (3)

    NameTypeDescription
    active_prompt_slotINT
    phase_indexINT
    reportSTRING