Nodes/CFG Megapack/FDG: Frequency-Decoupled Guidance (Sadat et al. 2025)
ComfyUI Node

FDG: Frequency-Decoupled Guidance (Sadat et al. 2025)

Guide the texture hard, guide the colour gently

By AbstractEyes·Created 5 days ago·Updated 5 days ago· 3
FDG: Frequency-Decoupled Guidance (Sadat et al. 2025)
  • model
  • MODEL
◄scale-1.0►
◄w_low-1.0►
◄levels2►
◄parallel_weight1.00►
◄formulationpaper►
◄spaceauto (the method's own)►

Here's the trade every SDXL user has made a hundred times: crank cfg up for prompt adherence and the colours slip toward neon, back it off and your carefully written prompt gets a shrug. Frequency-Decoupled Guidance (Sadat, Vontobel, Salehi & Weber, arXiv 2025) is a clean way out of that trade - guide the two predictions differently depending on the scale of the detail you're looking at.

How it works

FDG builds a Laplacian pyramid of both the conditional and the unconditional prediction. Level 0 is the finest detail, the last level is the coarse residual - the layout-and-colour end of the image. Then it guides each level separately: the full scale on the detail levels, a lower scale on the coarse one, and it reconstructs.

The default for that coarse scale is half the main scale (w_low of -1), so at cfg 10 the layout is essentially guided at 5. Since over-saturation is largely a coarse-band problem - that's where the blown-out reds live - you get the adherence of the high scale where it reads as sharpness and the colours of a much lower one.

The inputs that matter

  • scale - the guidance scale for this rule, -1 (default) to inherit the KSampler's cfg.
  • w_low - the scale on the coarsest level. Default -1 means w / 2, which is the sweet spot the paper reports. Set it equal to scale and FDG collapses into plain CFG; that's your A/B control.
  • levels - pyramid depth, 1 to 5, default 2. Two is what the paper uses. More levels give you a finer staircase of scales across the bands; they also cost a few blurs per step, though no extra model evaluations.
  • parallel_weight - a second, subtler knob: below 1, part of each level's guidance direction along the conditional prediction gets removed. Leave it at 1 unless you are deliberately reproducing the diffusers variant. The formulation combo (paper vs diffusers) only does anything once parallel_weight is off 1 - they are identical at the default.

space is safe on auto.

Output is one MODEL, so: Load Checkpoint → FDG → KSampler.

Installing it

The pack installs in one go; every node in it comes from the same place.

ComfyUI Manager: search CFG Megapack, install, restart. comfy-cli: comfy node install comfy-cfg-megapack. By hand:

cd ComfyUI/custom_nodes
git clone https://github.com/AbstractEyes/comfy-cfg-megapack

Restart afterwards. There's no requirements.txt and nothing to download - the pack leans on torch and the Python standard library, plus ComfyUI's current node API (comfy_api.latest). Tested against ComfyUI 0.38.0 with torch 2.11. If your GPU is shared, CFG_MEGAPACK_VRAM_FRACTION=0.6 before starting ComfyUI caps how much of it the pack will use.

You can eyeball it without building anything: Workflow → Browse Templates → Custom Nodes → comfy-cfg-megapack has example graphs that render plain CFG and the variant from one seed.

Where it fits, and what to watch

FDG is one of three frequency nodes in this pack, and they are not meant to be stacked:

  • FDG decomposes with a Laplacian pyramid and guides level by level.
  • FreSca does it in the Fourier domain, scaling the low and high bands around a bin cutoff.
  • HiWave uses a single wavelet level and leaves the coarse band conditional.

Pick one. They all occupy the same "where to guide" stage conceptually, and if you chain two, the second takes over the plan for that stage - a later node of the same stage replaces an earlier one. Chaining FDG and FreSca won't error, it'll just quietly give you one of them and a confusing afternoon.

Two real failure modes:

  • Chain-order against other packs. Other packs' CFG-function nodes - RescaleCFG, Mahiro, RenormCFG - share ComfyUI's single CFG-function slot with this one, and the last one chained wins. If FDG looks inert, check what's sitting between it and the sampler.
  • levels above 2 without a reason. Each level is another band whose scale you can no longer reason about, and the intermediate scales are interpolated between scale and w_low rather than being exposed. Start at the default, change one thing at a time.

For the "high cfg without burnt colours" job specifically, the pack's own recipe list puts FDG's cousins in the same slot: APG, or any combine rule followed by CFG Correct: Magnitude with rescale_std around 0.7. FDG is the one that fixes it inside the guidance rather than after it, which is why it doesn't fight your prompt at all.

CategoryCFG Megapack/papers/frequency and space

Inputs (7)

NameTypeDefaultDescription
modelMODEL—
scaleFLOAT-1.0-1–100The guidance scale w for this rule. -1 uses the sampler's cfg value.
w_lowFLOAT-1.0-1–30Scale on the coarsest level (-1 = w / 2).
levelsINT21–5Pyramid levels.
parallel_weightFLOAT1.000–1Weight of each level's part along the conditional (1 = none removed).
formulationCOMBOpaperIdentical at parallel_weight 1.
spaceCOMBOauto (the method's own)Where the rule is computed. Linear rules give the same image in any space; nonlinear ones do not. 'auto' uses the space the method was published in (noise for most, denoised for APG and the angle rule, velocity for flow models).

Outputs (1)

NameTypeDescription
MODELMODEL—