Nodes/ComfyUI Model Bending/Gaussian Blur Module (Bending)
ComfyUI Node

Gaussian Blur Module (Bending)

Soften a layer's features, not your final pixels

By abuzreq·Created 2 years ago·Updated 11 days ago· 26
Gaussian Blur Module (Bending)
    • BENDING_MODULE
    ◄sigma1.00►

    Everyone reaches for a blur node at the end of the pipeline, and it always looks like a blur. Blur the model's features at the right block instead and you get something different in kind: the network loses fine structure while it's still reasoning about the scene, so it rebuilds a coherent image that simply has less detail in the places you blurred.

    Gaussian Blur Module (Bending) is that operation. Like every module node in this pack it outputs a BENDING_MODULE and needs an applier to do anything.

    What it does

    Spatial Gaussian blur, with sigma measured in latent cells or tokens, not pixels. Under the hood it's a separable pair of 1-D convolutions - blur along one axis, then the other - with edge replication padding, which is why it behaves at the borders instead of darkening them. Kernel radius is about 3σ, so sigma 20 pulls in a reach of 60 cells in each direction, per axis.

    Two practical consequences:

    • The unit is latent-space. On an SD 1.5 or SDXL model, one latent cell is 8 pixels; on something with a 16× latent, one cell is 16 pixels. sigma: 1 is a gentle 8–16px-ish softness at that layer's resolution, and it's the same number you'd use in the pack's other blur-flavoured ops.
    • sigma: 0 is a no-op (the code short-circuits), so the low end of the range is safe to leave wired in.

    Blur also behaves differently depending on where you put it. Early layers carry structure, so a blur there softens composition and often just makes the model draw something vaguer. Middle layers carry style and texture, which is where this node earns its keep: softer skin, less graffiti-level detail, a washier illustration look, fewer of the crispy over-sharpened artefacts you get from a low-step turbo model.

    Inputs and output

    One input: sigma, default 1, range 0–20, step 0.05. One output: BENDING_MODULE.

    The single-scalar interface is the point. There's no direction, no padding choice, no strength curve - blur is isotropic and that's that.

    Wiring it

    Hand the module to a bending applier:

    • Model Bending with a layer path - bbox-style texture layers on SDXL (things like output_blocks.5.1) give the softest results, while middle_block.2.out_layers is the classic demo location.
    • DiT Block Bending with a block spec like double:0-6, spatial on. On video models this blurs the picture per frame, not across time.
    • Attention Map Bending - blurring the attention map spreads each prompt token's influence over a wider area of the frame, which reads as soft, smeared shapes following your prompt.
    • Model VAE Bending - blur at decode time, closer to a conventional output blur but with the model none the wiser.
    • Wrap it in Timestep Gated Bending if you want the blur only during the detail steps, or Apply To Subset to blur some channels and not others.

    Distance from the sampler matters too: blur at the middle block is baked in and the model compensates for it, so the image stays sharp-ish overall while texture flattens. Blur at the last blocks or the VAE and it's closer to a final-pass filter.

    Install

    ComfyUI Manager → search "ComfyUI Model Bending", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/abuzreq/ComfyUI-Model-Bending
    pip install -r ComfyUI-Model-Bending/requirements.txt
    

    kornia and scikit-learn, then restart ComfyUI. Console output is tagged [model-bending].

    Where people get burned

    • Thinking in pixels. Sigma 20 in latent cells on a 64×64 feature map is a blur wide enough to hit every edge from every corner; on a 4K pixel grid the same number sounds reasonable. It isn't, in this context.
    • Blurring a tiny feature map. The middle block on SD 1.5 runs at 8×8 latent cells. A sigma of 3 there is already a smear across a quarter of the map. Start at 0.5–1 and go up.
    • Expecting it to fix a noisy image. It softens detail the model would have drawn; it doesn't remove noise the sampler introduced after that layer.
    • Blurring then sharpening the same layer. Those two cancel in a way that mostly produces mush. Pick a distance.
    • Forgetting that this is one module among many. If the plan is "soften the skin", the honest tool is still inpainting or a detailer pass. This is for people who want the softness to come from the model's own representations.
    Categorymodel_bending

    Inputs (1)

    NameTypeDefaultDescription
    sigmaFLOAT1.000–20Blur radius in latent cells / tokens

    Outputs (1)

    NameTypeDescription
    BENDING_MODULEBENDING_MODULE—