Nodes/ComfyUI Model Bending/Latent Operation (Add Noise)
ComfyUI Node

Latent Operation (Add Noise)

Shake up your latents (or your conditioning) with one slider

By abuzreq·Created about a year ago·Updated 3 months ago· 21
Latent Operation (Add Noise)
    • LATENT_OPERATION
    std0.05

    This node doesn't touch a sampler, a scheduler, or your prompt - it just hands you a LATENT_OPERATION that adds Gaussian noise to a latent tensor. You won't use it for its own sake. You use it as a building block for the two places in the Model Bending pack where you want to stir the pot: jittering the conditioning embeddings or applying noise to the intermediate latents at one specific denoising step. Think of it as the "spice" input on the pack's other nodes.

    Here's the trick to understanding it: LATENT_OPERATION is not a tensor, it's a recipe. This node doesn't add noise to anything on its own. It returns a callable that, given a latent tensor x, returns x + gaussian_noise * std. Whatever node you feed that recipe into - ConditioningApplyOperation, LatentApplyOperationCFGToStep, or Latent Operation To Module - actually applies it at the right moment in the pipeline. So the graph you build is: make an operation, then wire it into the node that decides where the noise happens.

    The only input you set is std, default 0.05. That's the standard deviation of the noise relative to the magnitude of the activations it hits. 0.05 is subtle. On conditioning embeddings a 0.1-ish nudge is enough to make the output visibly wander without torching your prompt adherence; on latents mid-denoise you can go bigger and watch things disintegrate in interesting ways. There's no seed on this node, so same workflow, same seed, same result - the noise comes from torch.randn_like, which the sampler's own seed discipline covers.

    One genuine gotcha: if you plug this into ConditioningApplyOperation you're corrupting the CLIP encoding in semantic space, not pixel space - the whole point of that setup is moving the conditioning around to get creative variation. If you expected a pixel-level effect, you'll be confused. And if you chain it into LatentApplyOperationCFGToStep, remember that operation is applied once at the step you pick, not throughout.

    Install is the same as every node in this pack: ComfyUI Manager → search "ComfyUI-Model-Bending" → install → restart and refresh. Or clone manually:

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

    then restart ComfyUI. The pack pulls in kornia and scikit-learn; Manager resolves those for you.

    Where people get burned: they expect LATENT_OPERATION to be droppable into a KSampler directly. It isn't - it's a custom type this pack defines, and it only connects to the pack's own consumers. If ComfyUI shows you red sockets, that's why. Start small, and remember this is experimental tinkering, not a polished production node - the whole pack is a low-level toy for poking models, which is exactly what makes it fun.

    Categorymodel_bending

    Inputs (1)

    NameTypeDefaultDescription
    stdFLOAT0.05

    Outputs (1)

    NameTypeDescription
    LATENT_OPERATIONLATENT_OPERATION