Nodes/ComfyUI-Adept-Sampler/Adept Spectral Modulation (CFG)
ComfyUI Node

Adept Spectral Modulation (CFG)

The frequency-domain CFG sharpener hiding in a sampler pack

By nawka12·Created 8 months ago·Updated 4 months ago· 4
Adept Spectral Modulation (CFG)
  • model
  • MODEL
strength1.0
percentile5.0

Here's the odd one out. Everything else in this pack gives you a SAMPLER or SIGMAS socket. This node isn't a sampler or a scheduler at all - it's a model patch that changes how your CFG behaves. You wire a MODEL in, get a patched MODEL out, and put it between your checkpoint loader and your sampler. It lives in the samplers category because it was built to team up with this pack's EQ-VAE samplers, but it works with anything.

What it actually does: it implements Clybius's Spectral Modulation, originally from ComfyUI-Latent-Modifiers. During sampling, ComfyUI computes the noise prediction as cond − uncond and scales it by your CFG value. This node hijacks that step and runs the noise prediction through a frequency-domain filter first. It takes an FFT, measures the log-amplitude, and damps or boosts the tails of the spectrum based on a percentile threshold, then transforms back. The net effect is that high-frequency content - fine lines, texture, detail - gets emphasized relative to the flat, low-frequency mush, which shows up as sharper, crisper output. It's a frequency-space high-detail lever applied exactly where it belongs, before the CFG scaling, rather than a crude sharpening filter on the finished image.

The two inputs:

  • strength (0–2, default 1.0) - how much of the effect gets applied. 0 is a no-op; 1 is the full Clybius effect; 2 is aggressive. This is the main dial.
  • percentile (1–15, default 5) - the percentile threshold that decides what counts as "high frequency" for the mask. Lower values mean a smaller, more extreme tail gets boosted; 5 is a sane default.

Output is a patched MODEL, which is why it slots into the MODEL → MODEL chain before your sampler rather than into SamplerCustom itself. Because it patches the CFG function, the model it gives you is a clone - your original stays untouched, and the patch only lives in that branch.

Where people get burned: cranking strength past 1.5 without listening. Too much spectral emphasis turns into noise, halos, and that crunchy artifact look - the README positions it as an optional sharpener for EQ-VAE models, not a daily driver. It also patches the CFG path, so if you're running a CFG-alternative setup (CFG++ guider, or a distilled model at CFG 1 where there's no cond − uncond signal to modulate), it can do nothing at all or behave weirdly. And the model prints a warning to the console on failure - it degrades gracefully to a no-op, so you may not notice it quietly stopped working.

Install is the pack-wide one:

cd ComfyUI/custom_nodes
git clone https://github.com/nawka12/ComfyUI-Adept-Sampler

Restart, or grab it via ComfyUI Manager by searching "ComfyUI-Adept-Sampler". No requirements.txt, no model downloads - pure Python on top of torch.

The take: it's a niche sharpening tool that earns its keep specifically on EQ-VAE models (the README pairs it with AkashicSolver), where the detail boost rounds out the package. On a plain SDXL workflow, Adept Spectral Modulation is more of a "try it once, see if you like it" toy than a must-install. If you do use it, start at strength 1.0 and move in small steps.

Categorysampling/adept/samplers

Inputs (3)

NameTypeDefaultDescription
modelMODEL
strengthFLOAT1.00–2
percentileFLOAT5.01–15

Outputs (1)

NameTypeDescription
MODELMODEL