Nodes/SigmaWaveFormNodes/Fourier Filter Node
ComfyUI Node

Fourier Filter Node

A smoothing iron for sigma schedules

By BenNarum·Created 2 years ago·Updated 2 years ago· 6
Fourier Filter Node
  • sigmas
  • filtered_sigmas
◄filter_typelowpass►
◄cutoff_frequency0.10►
◄apply_inverse_fouriertrue►

The waveform generators in the SigmaWaveFormNodes pack are great at making jagged, spiky noise schedules. The problem is the jagged, spiky part. The Fourier Filter Node is the pack's answer: take any SIGMAS sequence, decompose it into frequencies, carve out the ones you don't want, and stitch it back together. It's the post-processing half of the pack - generate a wave with Sigma Waveform Node, then run it through this to knock the rough edges off before it ever reaches a sampler.

This is a real, mechanically sensible tool, and it's the one node in the pack you could justify using on sigmas that didn't come from this pack at all. If a custom schedule from anywhere else feels jittery - one step wildly louder than its neighbors - a lowpass here will settle it down.

How it works

Genuine Fourier filtering, not a pretend version. It takes your input sigmas, runs an FFT to get frequency-space coefficients, computes the matching frequency axis with fftfreq, and then zeroes out the bins that fall outside your filter's passband. If apply_inverse_fourier is on (it is by default), it runs the inverse FFT and hands back a real, smooth sequence.

The filter_type choices are the standard four:

  • lowpass (default) - keeps the slow-moving shape, kills the high-frequency jitter. This is the one you actually want for smoothing a waveform schedule.
  • highpass - the opposite: keeps only the fast wobble. Mostly useful for studying, not generating.
  • bandpass / bandstop - keep or kill a slice of frequencies. The band is computed as (cutoff_frequency, cutoff_frequency * 2), so with the default cutoff of 0.1 the passband is roughly 0.1–0.2.

The only other input is cutoff_frequency (0.01–0.5, default 0.1), a normalized frequency. Lower = smoother output.

Output is filtered_sigmas, ready to feed onward just like any other SIGMAS.

Installing it

Bundled with the whole pack - ComfyUI Manager search "SigmaWaveFormNodes", or:

cd ComfyUI/custom_nodes
git clone https://github.com/BenNarum/SigmaWaveFormNode

Restart ComfyUI. Dependencies are just numpy and torch, both already present; no models to download.

The footgun: leave the inverse Fourier toggle ON

apply_inverse_fourier defaults to true and you should keep it that way. Turn it off and the node hands you the raw frequency-domain coefficients instead of transforming back - a complex-valued spectrum, not a time-ordered noise schedule. PyTorch's conversion of that complex data to a float tensor just discards the imaginary part (on newer versions with a warning; on older ones it throws outright). Either way you get a meaningless sequence and no sampler is going to thank you for it. There's no realistic use case for the off position with this node - consider it a "don't touch" switch.

The other thing to remember is that filtering changes magnitudes. Zeroing out bins reshapes the schedule, and a lowpass with a very low cutoff can flatten your sigmas toward near-constant values, which defeats the point. Keep the cutoff high enough that the overall arc survives; you're removing jitter, not the curve.

Categorysampling/custom_sampling/filters

Inputs (4)

NameTypeDefaultDescription
sigmasSIGMAS—
filter_typeCOMBOlowpass4 options: lowpass, highpass, bandpass, bandstop
cutoff_frequencyFLOAT0.100.01–0.5—
apply_inverse_fourierBOOLEANtrue—

Outputs (1)

NameTypeDescription
filtered_sigmasSIGMAS—