Image FFT (2D)
Turn any image into something you can edit like audio
- image
- frequency
This is the front door of the whole pack. Image FFT (2D) takes a normal IMAGE and hands you back a FREQUENCY - which is the pack's custom data type for "your image, but decomposed into sine waves." Every other node in ComfyUI-FFT-2D either eats or produces that FREQUENCY type, so this is almost always where a frequency-domain workflow starts. If you've ever wished you could treat an image like an audio EQ - boost the bass, cut the treble, see the whole thing as a spectrum - this is the node that makes that possible.
Why would you bother? Because some operations are brutally easy in frequency space and painful in pixel space. Sharpening is "turn up the high frequencies." Blur is "cut them." Separating lighting from texture - the classic frequency-separation move for skin retouching - is a single filter instead of a hand-painted layer mask. You don't need it for everyday generation, but when you want it, nothing else quite does it.
How it works
The node runs a 2D Fast Fourier Transform on each color channel using np.fft.fft2, then fftshifts the result so the zero-frequency component (the "DC" term - the overall brightness) lands at the center of the spectrum. That centered convention matters: every filter node in the pack assumes the center is DC, so masks and cutoffs you draw are all measured outward from the middle, like ripples.
Under the hood the output is a dict wrapping a complex numpy array plus the original shape - you never see that, you just see a FREQUENCY socket. Two things worth knowing: it works per-channel, so RGB stays RGB through the transform; and it's plain CPU numpy, not GPU torch. At 512² or 1024² that's instant. At 8192² (the max the widgets allow) it'll take a real second or two. Fine, just don't treat this as a GPU-accelerated pipeline.
The inputs that matter
There's exactly one: image, a normal IMAGE socket. Plug in anything - a generated frame, a photo, or the zone-plate test pattern from CZPGenerate if you want to see a textbook spectrum. The single output is frequency, which wires into FFTCrossover, FFTMultiply, FFTMagnitudePreview, or back out through ImageIFFT2D.
How to install it
Standard custom-node fare. In ComfyUI Manager, search for ComfyUI-FFT-2D and install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/NobutakaKuroki/ComfyUI-FFT-2D
Restart ComfyUI and the node appears under the fft category. There are no pip dependencies to install - the pack uses numpy, torch, and PIL, all of which ComfyUI already ships - and no model files to download. This is an educational pack by Dr. Nobutaka Kuroki (Kobe University), and the repo ships seven "lesson" workflows plus sample images; grab them from the lesson_workflows and examples folders to see FFT→IFFT, band-pass, convolution and deconvolution end to end before you build your own.
Gotchas
The most common first-run confusion is hooking the FREQUENCY output straight into a Save Image node and getting a type error - FREQUENCY isn't an IMAGE. You have to preview it with FFTMagnitudePreview or FFTPhasePreview, or bring it back to pixels with ImageIFFT2D. That's not a bug, it's the whole design: frequency space is a place you visit, not somewhere you export from. And if the whole pack feels niche, you're right - frequency-domain work in the ComfyUI community is a quiet, stable niche, mostly used for diagnostics and teaching, not the default path to a pretty picture. That's fine. When you need it, it's the right tool.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| frequency | FREQUENCY | — |