Radial Spectrum Normalizer
Nudge your image's power spectrum back toward the 1/f² that nature uses
- image
- image
Natural photographs follow a power law: on average, spectral power falls off as 1/f^α with α close to 2. AI-generated images - especially over-sharpened ones and anything that's been through an eager upscaler - carry excess high-frequency energy, so their spectrum sits above the natural curve in the highs. You can't see that excess in the image; it just makes the output read as "synthetic" and makes the VAE encoder fidget. RadialSpectrumNormalizer is the node in ComfyUI-Spectral-Preprocessing-Nodes that measures your spectrum's actual falloff and gently bends it back toward the natural one.
It's the model-based sibling of SpectralWhitening (which measures and corrects the actual radial bias without assuming a curve shape). This node assumes the 1/f^α law and fits toward it, which makes it more robust when the image is mostly healthy, and less aggressive than the data-driven alternative.
How it works
The node estimates the current radial power spectrum - mean energy at each distance from the DC center - then builds a smooth correction gain curve that would reshape it toward the target 1/f^alpha law, and blends that correction in with strength. Three safety rails keep it sane: preserve_low_freq freezes gain at 1.0 inside a small radius (so global structure and brightness are untouched), smoothing Gaussian-smooths the gain curve (so you don't get per-ring ringing), and the gain is blended rather than fully applied. Phase is never touched.
The inputs that matter
alpha(default 2.0) - the exponent of the target law. Natural photos ≈ 2.0; higher pushes more energy toward low frequencies (darker, smoother); lower flattens the slope.strength(default 0.5) - how much of the correction to apply. The README explicitly says start low - 0.3–0.6 is its recommended band for "too synthetic" texture.preserve_low_freq(default 0.1) - normalised radius below which gain is frozen at 1.0. Protects global structure; leave near default.smoothing(default 0.05) - Gaussian smoothing sigma on the gain curve. Higher = smoother transition, less ringing, at the cost of a looser correction.
Then the pack-standard tile_size / tile_overlap for large images. One image output.
Installing it
Part of ComfyUI-Spectral-Preprocessing-Nodes - one install, sixteen nodes, all under Spectral Preprocessing. ComfyUI Manager (search "ComfyUI-Spectral-Preprocessing-Nodes"), or:
cd ComfyUI/custom_nodes
git clone https://github.com/EdoardoGuerriero/ComfyUI-Spectral-Preprocessing-Nodes
Restart. Dependencies are numpy and scipy, both shipped with ComfyUI. Nothing else to fetch.
Where people get burned
The trap is treating it as a sharpness dial. It isn't - it's a statistical correction, and if you push strength to 1.0 the image can lose texture character even though no pixel-level blur was applied. The other classic miss: it's the wrong tool when the problem isn't a smooth HF excess but discrete artifacts (checkerboards, spikes) - that's the Spike Suppressor's job. The README's own demo shows the target: take the source with injected HF noise, and the after-image's spectrum settles onto the grey 1/f² reference line. Run the FFT Spectrum Visualizer's radial-profile panel first: if your spectrum sits above the grey reference in the highs, this node is the fix; if it's roughly on the line already, you're over-processing and should leave it out. When in doubt, strength 0.3 and a glance at the profile beats guessing.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| alpha | FLOAT | 2.000.5–4 | Exponent of the target 1/f^alpha power law. Natural photos ≈ 2.0. Higher values push more energy toward low frequencies. |
| strength | FLOAT | 0.500–1 | Blend factor between the original spectrum (0) and the fully corrected spectrum (1). Start low. |
| preserve_low_freq | FLOAT | 0.100–0.5 | Normalised radius (0–1) below which gain is frozen at 1.0. Protects global structure and brightness. |
| smoothing | FLOAT | 0.0500–0.3 | Gaussian smoothing sigma applied to the radial gain curve (as a fraction of the number of bins). Higher = smoother transition, less ringing. |
| tile_size | INT | 00–2048 | Tile size for large images. 0 = process whole image. |
| tile_overlap | INT | 640–512 | Tile overlap in pixels (used only when tile_size > 0). |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |