FFT Radial Mask (Generate)
Build your own low-pass or high-pass filter, then multiply it in
- frequency
FFT Radial Mask (Generate) is the "make your own filter" node. You give it a size, pick low_pass or high_pass, and set a cutoff radius - and it hands back a FREQUENCY that is literally a circular mask, ready to multiply against an image's spectrum. It's the manual, build-it-yourself alternative to the fixed split you get from FFTCrossover, and it's the node that lets you chain filters: mask out the low frequencies, mask out the highs, multiply them together, and you've got a band-pass filter of any width you like.
Why build a mask instead of using the crossover? Because FFTCrossover always gives you both halves at once; sometimes you just want one filter to multiply into an existing pipeline, or you want a band-pass, or you want to hand-tune a mask shape and inspect it before committing. This node is the raw material - the FREQUENCY it outputs plugs straight into FFTMultiply, which is how frequency masking actually happens in this pack (Lesson 5 in the repo).
How it works
The mask is generated in the centered frequency domain with a hard edge: every pixel within cutoff_radius of the center is 1 for low_pass (0 for high_pass), and vice versa outside it. The radius is normalized per axis - 1.0 reaches the middle of each edge - so on a square image you get a circle and on a non-square one an ellipse matching the aspect ratio. Corners are always further out than edge midpoints, so at radius 1.0 the corners are still in the "high" region. The mask is stored as real-valued complex64 with zero imaginary part, shaped (1, H, W, 1), so it broadcasts cleanly against any image spectrum when multiplied.
Inputs: height, width, filter_type (low_pass / high_pass), and cutoff_radius (0–1, default 0.3). Output: a single frequency.
The knobs that matter
filter_type is the big choice - low-pass keeps smoothness, high-pass keeps detail - and cutoff_radius is where you'll spend your time. Small radius with low_pass = heavy blur. Small radius with high_pass = a thin edge-extraction layer that looks like line art when inverted. Start at 0.3 and sweep it; the FFTMagnitudePreview node will show you exactly what the mask looks like, which is the fastest way to internalize the cutoff. One honest note: this is a hard-edge mask, so a sharp cutoff can produce faint ringing in the reconstructed image - the classic ideal-filter tradeoff. If you want a gentler roll-off, this pack isn't the place; that's what an audio-style curve would do, and it's deliberately kept simple here.
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. No extra dependencies, no model files. lesson_workflows/5_FrequencyMasking.json shows the intended flow, and since it's an educational pack by Dr. Nobutaka Kuroki (Kobe University), the lesson files double as the documentation.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| height | INT | 5121–8192 | — |
| width | INT | 5121–8192 | — |
| filter_type | COMBO | 2 options: low_pass, high_pass | |
| cutoff_radius | FLOAT | 0.300–1 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| frequency | FREQUENCY | — |