Create CFG Schedule Float List
Change Wan's CFG per step, not per run
- float_list
Normally you give Wan one CFG value and it uses it for every denoising step. This node lets you give it a different CFG for each step - a ramp, a curve, a spike early then flat later. It spits out a plain list of floats, one per step, that you feed into a sampler input expecting a CFG schedule. The node's own description spells out the useful default behavior: "outside the set range cfg is set to 1.0."
Why would you want this? Because on Wan, CFG does its most important work early. The high-noise part of the schedule is where prompt adherence, motion, and composition get locked in, and that's where guidance matters. The later steps mostly refine detail, and there you can drop CFG toward 1.0 to save compute and avoid the over-cooked, contrasty look that high CFG can bake in. A per-step schedule lets you have both: strong guidance where it counts, cheap-and-clean where it doesn't.
How it works
You define a start value, an end value, an interpolation shape, and the slice of the schedule the ramp applies to. The node builds the full per-step list by interpolating between start and end across that window - and anywhere outside the window, it sets CFG to 1.0 (which on a flow-matching model effectively means "no guidance, just denoise"). Feed the resulting list into the sampler and each step reads its own CFG off the list.
The inputs and outputs that matter
cfg_scale_start(default 5) andcfg_scale_end(default 5) - the two ends of the ramp. Set start high and end low for the classic "guide hard early, coast later" curve. Leave them equal for a flat schedule that only clamps CFG to 1.0 outside the active window.start_percent(0) andend_percent(1) - where in the denoise the ramp is active, as a fraction. Everything beforestart_percentand afterend_percentruns at CFG 1.0. This is the knob that decides when guidance is on.interpolation(linear/ease_in/ease_out) - the shape of the ramp between start and end. Linear is the honest default; the eases just bias where the transition happens.steps(default 30) - must match the step count your sampler actually runs, or the list won't line up.
The single output, float_list, is the per-step CFG schedule. Wire it into the CFG-schedule input on your WanVideo sampler.
How to install it
Ships in the WanVideoWrapper. ComfyUI Manager: search ComfyUI-WanVideoWrapper, install, restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/kijai/ComfyUI-WanVideoWrapper
pip install -r ComfyUI-WanVideoWrapper/requirements.txt
then restart. No extra downloads for this one - it's pure math, it doesn't touch a model.
Common issues & troubleshooting
Step count mismatch. If steps here doesn't equal the sampler's steps, the schedule is stretched or truncated and you get CFG values on the wrong steps. Keep them in sync.
You're on a speed LoRA, so this fights you. CausVid and lightx2v force CFG 1.0 across the board - that's the whole distilled deal (see the distillation notes). A CFG schedule on top of a pinned-CFG-1 setup does nothing useful. This node earns its keep on full-quality runs, where you actually have CFG headroom to shape.
Motion got worse when you dropped CFG early. You probably clamped guidance off during the high-noise steps, which is exactly where Wan decides motion. Keep CFG up through the early percent and drop it late, not the other way around.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| steps | INT | 302–1000 | Number of steps to schedule cfg for |
| cfg_scale_start | FLOAT | 5.000–30 | CFG scale to use for the steps |
| cfg_scale_end | FLOAT | 5.000–30 | CFG scale to use for the steps |
| interpolation | COMBO | linear | Interpolation method to use for the cfg scale |
| start_percent | FLOAT | 0.000–1 | Start percent of the steps to apply cfg |
| end_percent | FLOAT | 1.000–1 | End percent of the steps to apply cfg |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| float_list | FLOAT | — |