Nodes/ComfyUI Model Bending/Add Noise Module (Bending)
ComfyUI Node

Add Noise Module (Bending)

The easiest way to make a model stumble

By abuzreq·Created about a year ago·Updated 3 months ago· 21
Add Noise Module (Bending)
    • BENDING_MODULE
    noise_std0.00
    seed0

    This is a one-knob node with an outsize effect: it adds Gaussian noise to the activations flowing through whatever layer you later inject it into. Where it lands determines everything. Added at a shallow UNet layer you get texture and grain drift; added at the middle block you can scramble composition wholesale. It's the "hold my beer" option of the Model Bending pack - one of the fastest ways to see what a layer is responsible for, because you're breaking its signal on purpose.

    Like every node whose output type is BENDING_MODULE, it doesn't do anything by itself. It builds a small module (an nn.Module that adds noise_std-scaled Gaussian noise to its input) and hands it to you as a recipe. You then wire that recipe into one of the pack's injector nodes - Model Bending (custom path), Model Bending (SD Layers) (block + layer), or Model VAE Bending - which plants it at the target layer. Every forward pass through that layer gets the noise added.

    You set two inputs:

    • noise_std - the standard deviation of the noise, default 0, range −100 to 100. Zero means no-op; start around 0.1–0.5 and creep up. Because activations are small-magnitude tensors, you rarely need to go far before things get interesting.
    • seed - the RNG seed for the noise. This one's worth using: it makes your noise reproducible, so you can A/B the same grain at different layers. The node's control_after_generate behavior means you can also let it randomize each run.

    The one trap to dodge: don't confuse this with Latent Operation (Add Noise). Both add noise, but this produces a BENDING_MODULE (activation-level, injected into a model) while that produces a LATENT_OPERATION (for the conditioning/step-application nodes). They're not interchangeable, and mixing them up is the most common reason a graph won't connect.

    Install is the same for every node in this pack - Manager is easiest:

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

    restart ComfyUI, refresh your browser. The pack depends on kornia (morphology ops) and scikit-learn (PCA); Manager handles both, or pip install -r requirements.txt after a manual clone.

    The honest warning: there's no "undo" on a bad bend beyond removing the module, and noise at high std will happily produce pure static. That's not a bug, it's the toy's personality. Keep the std small, keep the seed fixed, and you've got a cheap way to explore what each layer of your model actually does.

    Categorymodel_bending

    Inputs (2)

    NameTypeDefaultDescription
    noise_stdFLOAT0.00-100–100
    seedINT00–18446744073709550000

    Outputs (1)

    NameTypeDescription
    BENDING_MODULEBENDING_MODULE