InvertFFTNode
The all-in-one FFT filter — and why to skip it
- ff
- image
- IMAGE
- IMAGE
On paper, InvertFFTNode is the most convenient node in the fssorc/ComfyUI_FFT pack: instead of painting a mask, you get a single filterRadius slider and it runs both a high-pass and a low-pass filter on your image in one shot. On paper. In practice, this is the node you'll want to steer around.
What it's supposed to do
The pack's whole premise is the FFT filter you know from Photoshop: transform an image to the frequency domain, cut out a region, transform back. Where InvertFFTWithMask lets you carve out arbitrary shapes with a mask, InvertFFTNode cuts a plain square out of the middle of the spectrum, centered on the DC (zero-frequency) point. filterRadius sets the half-size of that square. Small radius = you keep only the low frequencies around the center = a blur / low-pass. Large radius = you remove the center = edges and detail only = high-pass.
Its three outputs (image, IMAGE, IMAGE) are meant to give you the filtered results alongside the masks and spectra that produced them, so you can see what you did.
The problem: as shipped, it doesn't run
Here's the thing nobody tells you: in the version of the pack on GitHub (no commits since September 2024), this node is broken. Its entry function does f0 = ff[0][0] - but the FFTData it receives is a Python dict, not a list, so that line throws KeyError: 0 before any filtering happens. The pack's other nodes read the data correctly via ff['FFT_Channel_Data']; this one doesn't. It was evidently never exercised end-to-end, and nobody's fixed it since.
Even if you patched that line, you'd find the rest is rough: it only processes the red channel (the green and blue channels are commented out), and all three outputs return the same 7-frame batch - reconstructed original, high-pass mask, high-pass result, high-pass spectrum, low-pass mask, low-pass spectrum, low-pass result. It's a debugging artifact wearing a finished node's coat.
What you should use instead
For the same square low-pass / high-pass idea with code that actually executes, reach for InvertFFTWithMask from the same pack: same FFTData input, same inverse-FFT mechanism, but it handles all three channels and takes a mask you can shape to the actual artifact. InvertFFTWithMask is the real workhorse here.
If you see InvertFFTNode in a downloaded workflow - it does show up, usually in old scan-restoration graphs - swap it out before running, or the whole workflow dies at that node. Don't waste time trying to make the slider feel right; it never gets that far.
Install
If you're curious to poke at it anyway, the pack installs normally:
cd ComfyUI/custom_nodes
git clone https://github.com/fssorc/ComfyUI_FFT
Or search for "ComfyUI_FFT" in ComfyUI Manager and install from there, then restart. No requirements.txt, no model downloads - just numpy, scipy, and OpenCV, which a stock ComfyUI already has. It's a tiny single-author pack (a handful of stars, last touched in 2024), so there's no upstream fix coming.
Bottom line: InvertFFTNode is a good example of a node that looks complete and isn't. If you came here because a workflow is throwing a KeyError: 0, this is your culprit - and the fix is a two-minute rewiring to InvertFFTWithMask.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| ff | FFTData | — | |
| filterRadius | INT | 100 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| IMAGE | IMAGE | — |
| IMAGE | IMAGE | — |