FrequencyDecoupledGuidance & True APG
FDG + True APG for detail that survives
- model
- MODEL
You know the trade-off: crank CFG and the image snaps into focus but the colors burn and the skin gets that plasticky oversaturation. Drop it to 4 and you lose fine texture. This node is the "have both" trick. FDG (Frequency-Decoupled Guidance, from the paper Guidance in the Frequency Domain Enables High-Fidelity Sampling at Low CFG Scales, arXiv:2506.19713) runs different guidance strengths on different image frequencies - strong on the high-frequency detail you actually want to keep, gentle on the low frequencies that cause the burn. The "True APG" part adds Adaptive Projected Guidance on top, the oversaturation fix that Forge popularized. Same one-liner install, no model downloads, and it patches any SD/SDXL/Illustrious-lineage checkpoint.
What it actually does
A patcher node, not a sampler. You drop it between your CheckpointLoader and KSampler's MODEL input, and it replaces the model's CFG function via set_model_sampler_cfg_function. Inside, it builds a Laplacian pyramid of both the conditional and unconditional predictions, splits them into levels frequency bands (4 by default), applies a separate guidance scale to each band, and stitches the result back together. freq_guidance_high (default 8) steers the finest detail band; freq_guidance_low (default 1) keeps the coarse structure calm. Guidance scales interpolate linearly from high to low across the bands.
The interesting part is that it works on the raw model output (the noise prediction), not the denoised image, and it layers on a few stabilizers:
- momentum (default 0.5): an exponential running average of the guidance difference across sampling steps. It smooths the guidance signal so you can push CFG-ish strength without the jitter.
- adaptive_momentum (default 0.18): decays that momentum toward zero as denoising progresses - strong early, off by the end, so the final steps still snap into place. The
adaptive_momentumvalue controls how fast it fades. - eta (default 1): how much of the parallel APG component (the part pointing along the conditional prediction) gets kept. Drop it toward 0 to strip more saturation at the cost of prompt push.
- norm_threshold (default 15): clamps the L2 norm of the guidance difference per band so no single band can dominate. 0 disables it.
The inputs that matter
You'll realistically touch four knobs. levels (1–8) sets how many frequency bands to split into; 4 is a fine start, and low-res latents want fewer, not more. freq_guidance_high and freq_guidance_low are the whole point - raise the high one for crisper texture, lower the low one if colors still look overcooked. enabled (default on) is your A/B testing switch. The rest are tuning dials best left at defaults until you've heard the node once.
The single MODEL output is the patched model - wire it straight into a KSampler and keep CFG somewhere above 1 (a custom CFG function has nothing to chew on at exactly 1, when ComfyUI skips the unconditional pass). A standard DPM++ or Euler sampler works; this doesn't care about the scheduler.
Installing
The pack has zero dependencies beyond what ComfyUI already ships (just PyTorch and NumPy, no requirements.txt), so there's nothing to break:
cd ComfyUI/custom_nodes
git clone https://github.com/silveroxides/ComfyUI_FDGuidance
Restart ComfyUI and the four nodes appear under Guidance/Patchers. ComfyUI Manager usually finds it too - search "FDGuidance". MIT licensed, maintained by silveroxides, the same account behind the Chroma-GGUF quantization work. Expect slower sampling than plain CFG: you're running a Laplacian pyramid on both passes every step, plus stateful momentum. The VRAM bump is modest, the wall-clock hit is real.
Where people get burned
The two classic mistakes: running at CFG 1 (nothing happens, patch or not) and piling levels too high on small latents - at 1024px keep it at 3–5. And if frames feel like they're trailing ghost images, that's momentum doing its thing; it's tuned for stills. Want FDG for video instead? Reach for the Animation variant of this node - the base one chokes on 5D latent tensors. A friendlier, knob-light alternative for plain images is the sibling FrequencyDecoupledGuidance node; this one is the version you pick when you want momentum and real APG control.
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 | — |