Image IFFT (2D)
Turn a spectrum back into a picture
- frequency
- image
Image IFFT (2D) is the return trip. Where ImageFFT2D turns a picture into a FREQUENCY spectrum, this node takes a FREQUENCY and hands you back a normal IMAGE you can save, preview, or feed into the rest of your workflow. Every frequency-domain pipeline in this pack ends here: you transform, you filter, you transform back. Skip this node and you're stuck holding a spectrum with nowhere to go.
How it works
It runs the inverse 2D FFT (np.fft.ifft2) on the complex spectrum, undoing the fftshift the forward transform applied so you get real pixels back in the right orientation. The result is clipped to the [0, 1] range before it's returned as a float IMAGE tensor. It's the mirror image of ImageFFT2D - wire the two together with nothing in between and you get your original image back, bit for bit (within float rounding). That round trip is literally the pack's "Lesson 1" workflow, and it's a great sanity check the first time you install: if FFT → IFFT isn't a no-op, something upstream is off.
The one input is frequency, and the one output is image. Nothing to configure. The whole node is a two-line idea wrapped in a socket.
The gotcha you'll actually hit: clipping
The clip to [0, 1] is the silent trap. If you boosted the spectrum on the way through - cranked the FFTGraphicEqualizer gains, multiplied by a sharpening mask, divided aggressively in FFTDivide - the inverse transform can produce values outside the valid range, and this node just chops them off. Highlights blow out to flat white, shadows crush to black, and there's no warning. It's not a bug; it's what clipping means. The fix is upstream: keep your frequency edits gentle, or accept that a strong EQ pass wants a gain ramp-down before IFFT, the same way you wouldn't slam an audio limiter and expect clean output.
There's a subtler version of the same problem. Because the pack keeps DC at the center and all the filter nodes are built around that convention, anything that doesn't preserve the DC term properly can shift overall brightness. The FFTBasedResize node deliberately rescales the spectrum by the area ratio to compensate for the IFFT's normalization - that's the pack handling it for you. If you hand-build your own frequency edits, keep an eye on the DC pixel.
When you'd reach for it
Any time you've edited a spectrum and want to see the result as pixels - which is every time you use this pack for real work. The FFTMagnitudePreview node shows you what the spectrum looks like, which is great for checking your filter is shaped right, but the image result only exists once you pass through ImageIFFT2D. Typical shape: ImageFFT2D → FFTCrossover → tweak → FFTAdd to recombine → ImageIFFT2D → Save.
How to install it
Same as the rest of the pack. ComfyUI Manager → search ComfyUI-FFT-2D → install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/NobutakaKuroki/ComfyUI-FFT-2D
Then restart ComfyUI. No extra pip packages, no model downloads - the pack runs on numpy and torch, which you already have. It's MIT-licensed, authored by Dr. Nobutaka Kuroki at Kobe University as a teaching tool, so the seven bundled lesson workflows in the repo are worth loading just to see the intended patterns (deconvolution, convolution, band-pass) before you improvise.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| frequency | FREQUENCY | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |