Nodes/ComfyUI-JakeUpgrade/Wan22 cfg Scheduler List JK๐Ÿ‰
ComfyUI Node

Wan22 cfg Scheduler List JK๐Ÿ‰

Why your Wan 2.2 clip needs CFG 3.5 for two steps, then 1.0

By jakechaiยทCreated 2 years agoยทUpdated 3 months agoยท 147
Wan22 cfg Scheduler List JK๐Ÿ‰
    • cfg_list
    โ—„first_cfg3.50โ–บ
    โ—„cfg1.00โ–บ
    โ—„steps20โ–บ
    โ—„first_switch_at_step2โ–บ

    Wan 2.2 is a Mixture-of-Experts model, and that split has a weird consequence for how you set CFG. It uses two experts that take turns denoising: a high-noise expert that establishes motion and composition, and a low-noise expert that polishes detail. The high-noise expert responds to classifier-free guidance; the low-noise one is guidance-distilled, which means it wants CFGโ‰ˆ1.0 - crank it and you get oversaturated, mushy output. That's why so many Wan 2.2 workflows use a schedule: a burst of guidance up front, then a drop to 1.0 for the rest of the steps.

    This node generates exactly that list. Four fields in, one list out.

    The inputs

    • first_cfg (default 3.5) - the CFG for the early, motion-setting steps.
    • first_switch_at_step (default 2) - how many steps run at first_cfg.
    • cfg (default 1.0) - the value after the switch.
    • steps (default 20) - total number of steps in the schedule.

    So the defaults produce [3.5, 3.5, 1.0, 1.0, ...] for a 20-step run. If the switch point exceeds the step count it's clamped, so you can't generate a list that's longer than your sampling run.

    Where the output goes

    The cfg_list output is a FLOAT list, one value per step. It's built to feed the CFG-scheduling input of JakeUpgrade's own "KSampler (High+Low)" / "WAN Sampler (High+Low)" subgraphs - they were added in the same update as this node (v2.1.0). If you're using a sampler that accepts a per-step CFG schedule, this is the clean way to hand it the two-phase curve.

    Install

    Part of the JakeUpgrade pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/jakechai/ComfyUI-JakeUpgrade
    cd ComfyUI-JakeUpgrade
    pip install -r requirements.txt   # Windows standalone: install.bat
    

    Or ComfyUI Manager โ†’ "JakeUpgrade". No model downloads for the node itself - the Wan models and Wan Video Wrapper are separate installs you'll need before any of the video workflows run.

    Where people get burned

    The trap is treating this like a normal CFG. If you're running a distilled low-step model or LoRA - lightx2v, FusionX, the "steps 4, cfg 1.0" crowd - the whole point is that CFG stays at 1.0 throughout, and this two-phase schedule is for the un-distilled 14B base. Don't bolt a 3.5 start onto a Lightning LoRA. And if you're not on Wan 2.2 at all, this node is meaningless: 2.1 and older aren't MoE in the same way, and the per-step list won't match their samplers. It's a Wan-2.2-only tool, aimed at one specific workflow style, and it does that one job well.

    Category๐Ÿ‰ JK/๐Ÿฆ‰ Video

    Inputs (4)

    NameTypeDefaultDescription
    first_cfgFLOAT3.500โ€“30Initial CFG value for first steps
    cfgFLOAT1.000โ€“30CFG value to switch to after initial steps
    stepsINT202โ€“1000Total number of steps in the schedule
    first_switch_at_stepINT21โ€“1000Step number to switch from first_cfg to cfg

    Outputs (1)

    NameTypeDescription
    cfg_listFLOATโ€”