Custom CFG Keyframes From List ππ π
Batch-generate a CFG schedule
- prev_custom_cfg
- cfg_extras
- CUSTOM_CFG
Chaining Custom CFG Keyframe nodes by hand is fine for two or three deliberate points. This node builds a whole CFG schedule from a list in one shot.
What it does
cfgs_float (required) is where the list goes in - a connected list of CFG values, one per keyframe you want generated, rather than a single typed number (the -1 shown as its default is just a placeholder for an unconnected widget). start_percent and end_percent (0 and 1 by default, required) bound the span of the sampling process the generated keyframes get spread across. print_keyframes (required, default false) - turn it on to print the generated start_percent/CFG pairs to the console, which is genuinely worth doing the first time you use this node so you can confirm the schedule matches what you fed in before spending render time on it.
prev_custom_cfg (optional) chains this generated block onto an existing hand-built schedule from the single Keyframe node, and cfg_extras (optional) is the same pack-wide escape hatch as the other Custom CFG nodes. Output is CUSTOM_CFG, feeding into Sample Settings the same as the rest of this family.
When this beats the single Keyframe node
Anytime you already have, or want to sweep through, a specific set of CFG values rather than placing two or three points by hand - testing a range of CFG values across one long render instead of running several separate renders at different flat CFGs, for instance.
What actually feeds cfgs_float
As with the equivalent nodes elsewhere in this pack, cfgs_float expects a connected list of numbers rather than a typed scalar - a Float list primitive, or values produced by another node upstream. The -1 shown as its default is only what you see with nothing wired in. A reasonable way to start: hand-type a short list of three or four CFG values spanning the range you want to test, confirm the generated schedule with print_keyframes, then extend the list once you're happy with how it's spaced.
Installing it
ComfyUI Manager: search AnimateDiff Evolved, author Kosinkadink, install, restart. Manual: clone https://github.com/Kosinkadink/ComfyUI-AnimateDiff-Evolved into custom_nodes, restart.
Common issues
Feeding a list with values well outside the normal CFG range - single digits to low teens for SD 1.5/SDXL-based AnimateDiff work - is the easiest way to get a burned, oversaturated stretch of frames without realizing why; print_keyframes catches this before you find out the hard way at the end of a render. Keep the list's length matched to what you actually want spread across start_percentβend_percent; a mismatch between list length and intended density is a common source of a schedule that doesn't look like what you pictured.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| cfgs_float | FLOAT | -1.000 | β |
| start_percent | FLOAT | 0.0000β1 | β |
| end_percent | FLOAT | 1.0000β1 | β |
| print_keyframes | BOOLEAN | false | β |
| prev_custom_cfgopt | CUSTOM_CFG | β | |
| cfg_extrasopt | CFG_EXTRAS | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| CUSTOM_CFG | CUSTOM_CFG | β |