FFT Phase Preview
The phase spectrum, painted in color so it's actually readable
- frequency
- phase
FFT Phase Preview renders the phase part of a spectrum - the half that magnitude previews ignore. Every complex spectrum has two components: magnitude (how strong each frequency is) and phase (where each frequency's wave starts). The phase is the quiet workhorse - it's what actually determines where edges land in the image - but it's famously hard to visualize, because a raw phase map is just wrapped angles between −π and π, which looks like TV static. This node solves that by encoding phase as color: hue carries the phase angle, brightness carries the log-magnitude. The result is a rainbow spectrum you can actually read.
Is it useful? Honestly, it's the most "educational" node in a pack that's already explicitly educational. Where FFTMagnitudePreview earns its keep as a debugging tool for filters, this one earns its keep as a lesson: once you've seen the phase preview, you understand why people say phase matters more than magnitude for image structure. It's also a surprisingly good check that your filtering hasn't mangled the phase - if you're editing spectrums and the color wheel looks scrambled, you're doing something lossy.
How it works
The spectrum is reduced to grayscale by averaging the complex values across channels (not averaging magnitude and phase separately, which would lose information at the ±π wrap), then hue is set from the angle and value from the log-magnitude, with full saturation. The output is always 3-channel RGB, whatever the input channel count. It's an output node, so it renders a PNG into the temp folder and passes the same data back as an IMAGE on its phase output - wireable onward, not just a display.
One input (frequency), one output (phase).
Reading it
Don't expect the phase preview to look like anything intuitive at first. The dominant color pattern tells you about the dominant wave directions in the image - strong horizontal edges show up as a particular hue axis. And note the same gotcha as its sibling: being an output node, it always runs and re-runs everything upstream, so don't pepper your graph with these once you're done learning. If the rainbow reads as noise, that's normal - the phase map of a real photo genuinely is high-entropy. The magnitude preview is the one you'll keep around for day-to-day filter work.
How to install it
Same pack, same routine. ComfyUI Manager → search ComfyUI-FFT-2D → install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/NobutakaKuroki/ComfyUI-FFT-2D
Restart ComfyUI and it's in the fft category next to FFTMagnitudePreview. No extra pip dependencies, no model files - this is pure numpy, from Dr. Nobutaka Kuroki's Kobe University teaching pack, MIT-licensed.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| frequency | FREQUENCY | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| phase | IMAGE | — |