FrequencyDecoupledGuidance & True APG (Animation)
FDG + True APG that speaks 5D
- model
- MODEL
Video is where CFG burns the hardest. Push the scale to hold the prompt on an AnimateDiff or Wan pass and every frame comes back oversaturated, waxy, flickering. This is the animation version of the pack's FDG_APG_Patcher - Frequency-Decoupled Guidance with the "True APG" projection, rebuilt to handle the 5D latent tensors (batch, channels, frames, height, width) that video samplers produce. Same idea as the stills node: split the prediction into frequency bands, guide the fine detail hard and the coarse structure softly, and let Adaptive Projected Guidance strip the oversaturation. Just aimed at a tensor with time in it.
How it's different from the stills version
Read the sibling FDG_APG_Patcher article for the full mechanism - momentum, eta, norm_threshold, per-band guidance scales - because every one of those knobs is here too. The input schema is byte-for-byte identical: model, enabled, levels, freq_guidance_high, freq_guidance_low, momentum, eta, norm_threshold, adaptive_momentum, interpolation_mode, one MODEL output.
The one real difference is what happens inside. The combined guidance function detects whether its input is 5D, and if so it reshapes (B, C, T, H, W) into (B*T, C, H, W) - frames stacked as a flat batch - runs the Laplacian pyramid math on 4D tensors, then reshapes back before returning. That's it. No 3D convolutions, no temporal modeling. Each frame is frequency-split independently; the temporal dimension just rides along.
Two practical consequences worth knowing. First, because the momentum running-average is shared across the whole batch at a given step, the history isn't per-frame - it's per-step-across-all-frames, which is exactly what you want for temporal consistency (frames at the same step reinforce each other rather than drifting apart). Second, the interpolation menu matters more on video: bilinear (default) is a safe universal, but nearest or area avoid the slight softness of resampling animated detail frame over frame. If fine textures shimmer, try area.
Using it
Wire it between the model loader and the KSampler in your video workflow - same position as its stills sibling. Keep CFG above 1 or the patch never engages. Start with the defaults (levels 4, high 8, low 1) and only touch momentum if you see frame-to-frame jitter; lower it toward 0.2 to calm the guidance. adaptive_momentum already ramps momentum to zero near the end of sampling, so you usually don't need to babysit it.
If your video pass doesn't need momentum or APG tuning at all, the pack's other animation node - FrequencyDecoupledGuidanceAnimation - is the lighter pick with just the per-band scales and an optional APG toggle.
Installing and gotchas
Same as the whole pack: no dependencies beyond what ComfyUI ships, nothing to download.
cd ComfyUI/custom_nodes
git clone https://github.com/silveroxides/ComfyUI_FDGuidance
Restart and it shows up under Guidance/Patchers as "FrequencyDecoupledGuidance & True APG (Animation)". ComfyUI Manager finds it if you search "FDGuidance". It's the author's own Comfy Registry entry, MIT licensed. The honest cost: pyramid math on both conditional and unconditional passes every step, per frame, plus momentum state - expect slower sampling than raw CFG, and on long generations keep an eye on VRAM. And no, you can't swap the non-animation nodes into a video graph as a shortcut; the base patchers will error on 5D input. Use the variant that was built for it.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| enabled | BOOLEAN | true | — |
| levels | INT | 41–8 | — |
| freq_guidance_high | FLOAT | 8.0-20–20 | — |
| freq_guidance_low | FLOAT | 1.0-20–20 | — |
| momentum | FLOAT | 0.50-1–1 | — |
| eta | FLOAT | 1.000–1 | — |
| norm_threshold | FLOAT | 15.00–50 | — |
| adaptive_momentum | FLOAT | 0.180–1 | — |
| interpolation_mode | COMBO | bilinear | 7 options: nearest, linear, bilinear, bicubic, trilinear, area, +1 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |