FFT Spectrum Visualizer
The debug node that tells you whether all the other nodes did anything
- image
- visualization
Every node in ComfyUI-Spectral-Preprocessing-Nodes is engineered to be visually invisible - they edit the FFT spectrum, not the pixels, and their whole job is to make an image easier to encode and sample, not prettier. That's great for your Flux img2img latent, but it creates a practical problem: how do you know any of them actually did anything? That's what FFT Spectrum Visualizer is for. It renders a 6-panel diagnostic grid of the frequency spectrum so you can see the artifacts before you kill them, and confirm the gain was applied after.
The pack's README is blunt about the workflow: use this before and after your preprocessing chain to verify the changes are meaningful for your specific source image. It's the difference between tuning blind and tuning with eyes open - and for this pack, that's most of the battle, because the effects are designed to be perceptually subtle.
What the six panels show
Wire in an image and you get a grid (default panel_size 256 per panel) showing:
- Log Magnitude -
log(1 + |FFT|), normalised. Bright spots are concentrated energy; that cross or those dots are your spikes and directional bands. - Phase - phase angle mapped to [0,1]. A uniform, noisy-looking panel is what a natural image does; structure here means something is off.
- Radial Profile - mean magnitude vs radius (white) against a 1/f² reference (grey). This is where you see the "too much high-frequency energy" problem that RadialSpectrumNormalizer targets.
- Angular Profile - energy vs angle. Spikes here are the directional artifacts that DirectionalArtifactSuppressor targets.
- Spike Heatmap - the z-score map from the same detection step Spectral Spike Suppressor uses.
- Gain Mask - the attenuation gain Spike Suppressor would apply at the current parameters.
That last panel is the clever bit: it previews the fix without you having to run the suppressor.
The inputs that matter
channel(defaultavg) - analyse the mean of RGB, or a single R/G/B channel. Per-channel is useful when you suspect colour-specific fringing.kernel_size(default 15) andthreshold_sigma(default 3.0) - these exist so the spike heatmap and gain mask panels match the settings you're using in Spectral Spike Suppressor. If you've tuned the suppressor, match the numbers here or the last two panels lie to you.attenuation(default 0.85) - only used for the gain-mask display, mirroring Spike Suppressor's value.panel_size(default 256) - pixels per panel.
The single output is visualization, an IMAGE - note it is not an output node, so you must wire it into a PreviewImage (or Save Image) yourself. The README calls it out as a debug node; don't put it in the chain that feeds the VAE.
Installing it
Part of the one-pack-fits-all ComfyUI-Spectral-Preprocessing-Nodes install. ComfyUI Manager, search "ComfyUI-Spectral-Preprocessing-Nodes", or:
cd ComfyUI/custom_nodes
git clone https://github.com/EdoardoGuerriero/ComfyUI-Spectral-Preprocessing-Nodes
Restart ComfyUI. Only numpy and scipy are required, both already in a stock install - no model files, no keys.
Where people get burned
Two ways. First: forgetting to preview the output - if the node seems to "do nothing," check whether you actually connected visualization to a PreviewImage. Second: the panel grid can look alarming when you're not used to reading FFTs. A bright cross through the center and a bright central dot are normal - every image's FFT has the DC component and border-discontinuity cross in it (that cross is precisely what the pack's MoisanDecomposition node exists to remove). Don't chase "a clean-looking spectrum" as an aesthetic goal; compare before vs after the same image and look for the specific artifact panels - the angular spike, the radial HF hump - to shrink. That's the whole game.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| channel | COMBO | avg | Which channel to analyse. 'avg' uses the mean of RGB. |
| kernel_size | INT | 153–63 | Median filter size — match to SpectralSpikeSuppressor. |
| threshold_sigma | FLOAT | 3.00.5–20 | Detection threshold — match to SpectralSpikeSuppressor. |
| attenuation | FLOAT | 0.850–1 | Attenuation shown in the gain mask panel. |
| panel_size | INT | 256128–512 | Pixel size of each individual panel in the grid. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| visualization | IMAGE | — |