Nodes/ComfyUI-Spectral-Preprocessing-Nodes/Spectral Channel Equalizer
ComfyUI Node

Spectral Channel Equalizer

Colour fringing is a frequency problem, so fix it per-channel

By EdoardoGuerriero·Created 2 months ago·Updated 2 months ago· 0
Spectral Channel Equalizer
  • image
  • image
strength0.50
preserve_low_freq0.08
smoothing0.060
tile_size0
tile_overlap64

Colour fringing - chromatic halos, purple/green edges, colour noise - is one of the classic tells that an image went through an AI upscaler or generator. And like most of what this pack attacks, it's fundamentally a frequency problem: the red, green, and blue channels of a fringed image don't have matching spectral energy distributions. One channel carries more high-frequency energy than the others, and where the channels disagree, you get coloured edges. SpectralChannelEqualizer is the node in ComfyUI-Spectral-Preprocessing-Nodes that makes the channels agree.

It's the pack's one colour-correction node, and it sits in a different lane from everything else: rather than attacking spikes, bands, or noise floors, it equalizes the radial power spectrum of each channel toward the mean across R/G/B. If the blue channel is carrying extra high-frequency energy relative to the others, a smooth per-channel radial gain pulls it back in line. The result is fringing suppression without touching global colour balance.

How it works

For each channel the node computes the radial power spectrum (mean energy vs distance from DC). It takes the mean across the three channels as the reference, then builds a smooth radial gain per channel that would push that channel's spectrum onto the mean - the channels with excess energy get attenuated, the channels with too little get boosted. Three rails keep it well-behaved: preserve_low_freq freezes all gains at 1.0 inside a small radius (so global colour balance and tone survive - you're fixing spectral mismatch, not recolouring), smoothing Gaussian-smooths the gain curves (no per-ring ringing), and strength blends the whole correction. Phase is never touched.

The inputs that matter

Honestly, this is one of the more "set it and leave it" nodes in the pack:

  • strength (default 0.5) - how strongly to equalize channel spectra. The README's tuning guide puts the working range at 0.3–0.7 for colour fringing.
  • preserve_low_freq (default 0.08) - normalized radius below which channel gains are frozen at 1.0. Protects global colour and tone.
  • smoothing (default 0.06) - smoothing sigma for the radial gain curves; leave near default.

Plus the pack-standard tile_size/tile_overlap for images above ~2048px. One image output.

Installing it

Part of ComfyUI-Spectral-Preprocessing-Nodes - install once, all sixteen nodes 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: numpy and scipy, both already bundled. No models, no downloads.

Where people get burned

The main thing to understand is what this node is not. It won't fix a global colour cast - if the whole image is too warm, that's a white-balance / tone problem, and equalizing channel spectra toward the mean won't shift it (that's exactly what preserve_low_freq is protecting). It targets mismatch between channels, i.e. fringing and chroma noise. Also note it's per-channel in a pack whose other nodes mostly work on the averaged/whole spectrum, so the README's recommended pipeline uses it late - fifth in the stack, after the artifact suppressors and noise-floor cleanup - to fix colour fringing once the structural stuff is handled. If fringing is your dominant complaint and nothing else in the pack applies, this is the one to reach for; if your image is just "off-colour," look at tone-mapping and white-balance nodes instead, because equalizing the spectrum won't rescue a bad grade.

CategorySpectral Preprocessing

Inputs (6)

NameTypeDefaultDescription
imageIMAGE
strengthFLOAT0.500–1How strongly to equalise the channel spectra. 0 = no change, 1 = full equalization toward the mean spectrum.
preserve_low_freqFLOAT0.080–0.5Normalised radius below which channel gains are frozen at 1.0. Protects global colour balance and image tone.
smoothingFLOAT0.0600–0.3Gaussian smoothing sigma for the radial gain curves (fraction of n_bins). Higher = smoother correction.
tile_sizeINT00–2048Tile size for large images. 0 = whole image.
tile_overlapINT640–512Tile overlap in pixels (used only when tile_size > 0).

Outputs (1)

NameTypeDescription
imageIMAGE