Nodes/ComfyUI-FFT-2D/FFT Magnitude Preview
ComfyUI Node

FFT Magnitude Preview

The preview node that makes FFT less abstract

By NobutakaKuroki·Created about a month ago·Updated about a month ago· 1
FFT Magnitude Preview
  • frequency
  • magnitude

FFT Magnitude Preview is the "show me what's happening" node. A FREQUENCY isn't an image - you can't just wire it into Save Image - so this is the node that renders it visible: it takes a spectrum and outputs a picture of the spectrum's magnitude, the classic FFT visualization you've seen in every signal-processing textbook. Center bright dot, symmetric blobs of energy radiating outward. That picture is worth a thousand filter settings, because once you can see the spectrum, the whole pack stops being abstract.

You'll reach for this node constantly while learning - and while debugging. Hang it off the output of FFTCrossover and you'll see the low band collapse to a bright disc at the center. Hang it off FFTRadialMaskGenerate and you'll see the mask you're about to multiply in. Compare the spectrum of a sharp image to a blurry one and you'll finally see what "the high frequencies were killed" means - the outer ring goes dark.

How it works

It computes log(1 + |spectrum|) - log-compressing the magnitude, because real spectra span many orders of magnitude and the DC term alone would swamp everything - then normalizes each image to [0, 1] so it displays as a proper grayscale image. It's an output node, so it renders a preview PNG into ComfyUI's temp folder and shows it in the UI, and it also passes the rendered magnitude back out as an IMAGE on its magnitude output. That second part matters: it's an IMAGE you can wire onward, not just a display.

The single input is frequency; the single output is magnitude (an IMAGE).

Gotchas

It's an output node, which means ComfyUI treats it as a terminal - it always executes and forces everything upstream of it to run, so don't scatter these everywhere in a production workflow if you care about caching. Also, don't confuse the magnitude preview with a real image of your content: it's a spectrum. Reading it takes a minute, but the pattern to look for is always the same - energy near the center is low-frequency (broad structure), energy far out is high-frequency (detail and noise), and an image with a bright cross through the middle usually means strong horizontal and vertical structure.

How to install it

Standard for the pack. ComfyUI Manager → search ComfyUI-FFT-2D → install, or:

cd ComfyUI/custom_nodes
git clone https://github.com/NobutakaKuroki/ComfyUI-FFT-2D

Restart ComfyUI. No pip extras, no model downloads. This is one of the two preview nodes (the other is FFTPhasePreview) in Dr. Nobutaka Kuroki's educational pack, and honestly the previews are where the "education" part shines - load lesson_workflows/1_FFT_IFFT.json and look at the spectrum of a real photo before you do anything else.

Categoryfft

Inputs (1)

NameTypeDefaultDescription
frequencyFREQUENCY

Outputs (1)

NameTypeDescription
magnitudeIMAGE