FreSca: Fourier band scaling (Huang et al. 2025)
Boost the fine band, leave the colour alone
- model
- MODEL
CFG has one scale for the whole image, but the whole image isn't the problem. The reason cfg 12 turns your photo into a traffic cone is mostly in the low frequencies - the broad areas of colour that get pushed past their limit - while the prompt-following you actually wanted lives in the detail. FreSca (Huang et al., arXiv 2025, the same trick as the ComfyUI node of that name) splits the guidance difference into a low band and a high band and applies a different factor to each.
How it works
It takes the guidance difference c − u, runs a centred 2-D FFT over the spatial axes, and multiplies the block of frequency bins within freq_cutoff of the centre by scale_low, everything outside that block by scale_high. Then it transforms back and does the ordinary CFG arithmetic with the filtered difference: u + w · filter(c − u).
So it's a band equaliser for your guidance. The default is the ComfyUI node's own setting - low band untouched, high band multiplied by 1.25 - while the paper went for 1.5 on SDXL and 1.2 on SD3. Push the high band and the image gets its edges and micro-texture from a harder-guidance model while the colour balance stays where cfg 7 to 9 would have put it.
The inputs that matter
scale- the guidance scale for this rule.-1, the default, means "whatever the KSampler's cfg is". Leave it.scale_high- the high-band factor, default1.25. This is the knob you came for. Somewhere between 1.25 and 1.5 is the useful zone; past that you're just running a higher cfg with extra steps.scale_low- the low-band factor, default1.0. Lower it toward 0.9 if you're still fighting saturation in broad colour areas. Set both to1and you have plain CFG, which is a handy sanity check.freq_cutoff- where the band edge sits, in frequency bins, default20. It's a hard box around DC, not a smooth rolloff, so treat it as "how much of the image counts as low frequency" rather than as a detail slider: bigger cutoff = more of the image gets the low-band treatment.space- safe onauto (the method's own). Filtering bands is linear, and linear rules give the same image in any space, so this dropdown won't change your result here.
One output: MODEL, patched, so it slots between the checkpoint and the sampler like everything else in this pack.
Installing it
Every node here comes from one pack, so you install once.
ComfyUI Manager: search CFG Megapack in the Custom Nodes Manager, 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 ComfyUI and the CFG Megapack folders show up in the node menu. Nothing else to install - no requirements.txt, no model files, since the pack only needs torch and the standard library on top of ComfyUI itself, through the newer comfy_api.latest node API. Tested on ComfyUI 0.38.0 / torch 2.11. Optional: set CFG_MEGAPACK_VRAM_FRACTION=0.6 before launching if the card is shared.
If you'd rather see it before you wire it, the pack ships example workflows - Workflow → Browse Templates → Custom Nodes → comfy-cfg-megapack renders a plain-CFG and a variant image from one seed, so you get an honest side-by-side in about a minute.
Where it sits in the chain
FreSca is one of the pack's three frequency nodes, and they're alternatives rather than layers: FDG uses a Laplacian pyramid, HiWave a single wavelet level, FreSca the Fourier bands. All three are the same "where to guide" idea with different maths, and a later node in a stage replaces an earlier one - chaining two of them gets you whichever is last in the plan, not the sum of both, which is a quietly confusing way to spend an evening.
The other thing to know is shared by the whole pack: chained after this node, another pack's CFG-function node - RescaleCFG, Mahiro, RenormCFG - takes ComfyUI's single CFG-function slot and wins. Chain FreSca last, or use the pack's own version of whatever you were stacking.
FreSca pairs nicely with a low-frequency fix from a different angle, too. If the colours still drift at high cfg, LF-CFG scales down the slow-changing low-frequency part of the guidance, and the pack's recipe list suggests APG or CFG Correct: Magnitude at rescale_std 0.7 for the same job. Any of these is a better answer than dropping your cfg to 5 and losing the prompt adherence you were fighting for.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| scale | FLOAT | -1.0-1–100 | The guidance scale w for this rule. -1 uses the sampler's cfg value. |
| scale_low | FLOAT | 1.000–3 | Low-band factor. |
| scale_high | FLOAT | 1.250–3 | High-band factor (paper SDXL 1.5). |
| freq_cutoff | INT | 201–256 | Band edge, in frequency bins. |
| space | COMBO | auto (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)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |