Nodes/ComfyUI Model Bending/Fourier Amplify Module (Bending)
ComfyUI Node

Fourier Amplify Module (Bending)

Fourier Amplify Module (Bending)

By abuzreq·Created about a year ago·Updated 3 months ago· 21
Fourier Amplify Module (Bending)
    • BENDING_MODULE
    cutoff_freq5.00
    amp_factor2.00

    Most bending modules act in the spatial domain. This one acts in frequency space: it takes a layer's activations, runs an FFT, boosts the low-frequency components, and transforms back. In an image, low frequencies are structure and composition, high frequencies are detail and noise. So amplifying the lows on a layer's output is like telling that layer "care more about the big shapes, care less about the fine stuff" - and the pack's README even marks it as a work-in-progress stab at a specific "enhancing creative generation" idea from a diffusion paper.

    The math is worth a sentence because it's genuinely clean: FFT the activations, shift so DC is centered, build a circular low-pass mask (everything within cutoff_freq of center), multiply those low frequencies by amp_factor while leaving the highs at 1.0×, then inverse-FFT back. The result is a bent activation where the coarse structure is louder relative to the detail - think "bigger skeleton, softer skin."

    Two inputs do all the work:

    • cutoff_freq - the radius of the low-pass circle, default 5, range 0–10. Larger means more of the spectrum counts as "low," so more gets amplified. At 0, nothing is amplified and it's effectively a passthrough.
    • amp_factor - how much to amplify, default 2, range −10 to 10. 1 is identity; above 1 the low frequencies dominate; below 1 (or negative) you're suppressing structure, which flips the effect into a high-pass emphasis - the layer's fine detail suddenly rules the image.

    Injected into early UNet layers, this produces a distinctly "painterly" softening - broad shapes stay, texture washes out. In the middle block it can shift composition and lighting in ways that feel like the model changed its mind about the scene. The amp_factor can go negative, which is unusual and worth playing with: negative amplification inverts those low-frequency components, and the results are weird in a good way.

    Install: ComfyUI Manager → search "ComfyUI-Model-Bending" → install → restart. Manual:

    cd ComfyUI/custom_nodes
    git clone https://github.com/abuzreq/ComfyUI-Model-Bending
    

    Dependencies: kornia (used elsewhere in the pack) and scikit-learn (Compute PCA); this module itself only needs torch's FFT, so the math runs fine.

    Honest expectations: the author's own source comment calls this a WIP attempt at a research idea, so it's the roughest of the module nodes - results vary a lot by layer and model, and there's no community writeup to copy from (this pack is small and largely un-discussed). Treat cutoff_freq and amp_factor as an exploration grid: keep amp low, sweep cutoff, and you'll quickly find the sweet spot where a layer's structure gets louder without the whole image going to mush.

    Categorymodel_bending

    Inputs (2)

    NameTypeDefaultDescription
    cutoff_freqFLOAT5.000–10
    amp_factorFLOAT2.00-10–10

    Outputs (1)

    NameTypeDescription
    BENDING_MODULEBENDING_MODULE