Nodes/ComfyUI-FDG/Frequency Decoupled Guidance (FDG)
ComfyUI Node

Frequency Decoupled Guidance (FDG)

CFG is one number. FDG splits it into frequency bands.

By sdtana·Created about a year ago·Updated about a year ago· 6
Frequency Decoupled Guidance (FDG)
  • model
  • MODEL
guidance_scale_high7.5
guidance_scale_low1.0
levels2
fdg_steps2

Every SDXL user knows the trap. CFG at 5–9 is your sweet spot; below it the image goes washed out and mushy, above it the colors burn and the skin turns to plastic. One number has to do three jobs at once - prompt adherence, fine detail, global structure - and it's good at none of them cleanly. FDG (Frequency Decoupled Guidance) is a MODEL-patching node that replaces that single CFG scale with a separate scale per frequency band: strong guidance for the fine detail, weak guidance for the structure. The pitch, from the paper: you get the sharpness and prompt adherence of a high CFG without the oversaturation.

This is a real research implementation, not a hobby wrapper. It ports Guidance in the Frequency Domain Enables High-Fidelity Sampling at Low CFG Scales (arXiv 2506.19713) from the same Sadat et al. group that gave you Perception Guidance - the earlier trick for fixing high-CFG oversaturation. FDG is the flip side of that coin: Perception Guidance made high CFG usable, FDG makes low CFG high-fidelity.

How FDG works

Drop it in front of a KSampler and it returns a patched clone of your model. The node swaps in its own CFG function, so every denoising step does this: take the conditional and unconditional predictions, build a Laplacian pyramid with levels levels, and split the difference between the two into frequency bands. The high-frequency bands - edges, texture, the detail your eye reads as "fidelity" - get guided hard at guidance_scale_high. The low-frequency bands - composition, global structure - get barely nudged at guidance_scale_low. Each band's guidance is applied, the pyramid is rebuilt, and that becomes the step's corrected prediction.

The intuition is worth internalizing: structure follows your prompt fine with almost no guidance, so the thing you're actually rescuing with CFG is the fine detail. FDG just stops the detail rescue from also frying the composition.

One wrinkle: FDG doesn't run the whole denoise. fdg_steps (default 2) limits it to the early, high-sigma steps where structure forms; after that it hands off to the KSampler's own cfg. Set the sampler's cfg to 1 and the hand-off silently uses guidance_scale_high as your effective scale - which is why the README says FDG "basically disables cfg values within KSampler." Set fdg_steps at or past your total step count and FDG runs the entire generation.

The knobs that matter

Out of the box (7.5 high / 1.0 low / 2 levels / 2 steps) the defaults are sane. You'll touch three things:

  • guidance_scale_high - how hard fine detail is pushed. Raise it for crisper texture, lower it if edges start ringing.
  • guidance_scale_low - structure adherence. 1.0 means "let composition breathe"; nudge it up if subjects drift from the prompt.
  • fdg_steps - how many early steps stay in FDG mode before the CFG hand-off.

levels (2–4) is the one to leave alone at first. Above 2, the node linearly interpolates the scale across bands, and more pyramid rebuilds means more chances for artifacts. The authors tested at 2.

Installing and wiring it

Lightest pack in the genre: no model downloads, no requirements.txt. ComfyUI Manager - search "FDG" or "ComfyUI-FDG" - or:

cd ComfyUI/custom_nodes
git clone https://github.com/sdtana/ComfyUI-FDG

then restart. It does import kornia, but ComfyUI core already ships kornia>=0.7.1, so a normal install just works. Only if you're running a very old ComfyUI or vendoring the node standalone would you need pip install kornia.

Wire it on the model's line between your loader and the KSampler: Load Checkpoint → FDGNode → KSampler, set the sampler's cfg to 1, and you're done.

Where people get burned

The README is blunt: "Testing on SDXL only." If it does nothing on a guidance-distilled model (Flux, Z-Image Turbo, Klein - anything that runs at CFG 1 because guidance is baked in), that's not a bug. Those models skip the unconditional pass entirely, and FDG has no uncond prediction to separate into frequencies. The whole mechanism is dead on them.

And set expectations: this node has essentially zero community footprint - a couple dozen comfy.icu impressions, no buzz, untouched since the paper dropped. It's a research curiosity and a genuinely clever trick to have in your bag, not a workflow revolution. Reach for it when you want prompt adherence without the burn on a classic SDXL checkpoint; don't rebuild your daily setup around it.

Categoryadvanced/model

Inputs (5)

NameTypeDefaultDescription
modelMODEL
guidance_scale_highFLOAT7.51–20
guidance_scale_lowFLOAT1.01–20
levelsINT22–4
fdg_stepsINT21–50

Outputs (1)

NameTypeDescription
MODELMODEL