Multiply Scalar Module (Bending)
The on/off switch for any layer
- BENDING_MODULE
Every activation in a layer gets multiplied by your scalar. That's the whole node - and it's secretly the most powerful knob in this pack, because 0 doesn't just dampen a layer, it kills it. Multiply Scalar is how you ablate. Set it to 0 and the layer's output becomes silence; the model has to generate without it. Set it to 2 and you're shouting through that layer. This is the module to reach for first with any target you want to understand.
It's a BENDING_MODULE factory: one numeric input in, a BENDING_MODULE out, which you feed to Model Bending, Model Bending (SD Blocks/Layers), Model VAE Bending, or LoRA Bending. The same math also appears inside latent-op form via Latent Operation (Multiply Scalar) - same multiplier, different output type.
The one input
- scalar (
FLOAT, default0, range −100 to 100) - the multiplier applied to every value in the target layer's output.
Yes, the default is 0. That's intentional: the pack's own result catalog is built on the sequence 0, 0.5, 1, 1.5, 2 - ablation, half-strength, untouched, boosted, doubled. 1 is the identity, so if you leave a module at its default and change nothing, that's the pass-through you'd expect.
How to actually use it
The productive loop is ablation mapping:
- Load a checkpoint, wire Model Bending (SD Layers) between it and the sampler.
- Feed this module at
scalar = 0. - Rerun, moving
layer_numup each time.
Each run tells you what one layer contributes. Most layers will shrug it off - a mild shift in style. A few will break the whole composition. Those few are your targets, and now you know where to aim a Rotate or a Threshold module instead of a sledgehammer. When you've found a layer you like, sweep the scalar: negative values invert the layer's contribution, which is a different kind of broken than zeroing it, and values past 2 tend to dissolve into texture noise.
Installing
This is a tiny node in the ComfyUI-Model-Bending pack - install the pack, get the node:
cd ComfyUI/custom_nodes
git clone https://github.com/abuzreq/ComfyUI-Model-Bending
Restart ComfyUI and refresh. ComfyUI Manager users: search ComfyUI-Model-Bending. Dependencies are just kornia and scikit-learn, nothing to download. Name the clone folder ComfyUI-Model-Bending, not the stale ComfyUI-Web-Bend-Demo from the README snippet.
Where people get tripped up
If you're multiplying activations, remember it's the layer's output being scaled, so values interact with whatever the next layer expects - large multipliers rarely mean "stronger in a good way," they mean "further from what the network was trained on." And if you bend a LoRA with this module, 0 completely cancels the LoRA's contribution, which is a clean way to A/B test whether a LoRA is even doing anything. Start at ablation, learn the layer, then dial the scalar like a volume knob - up to, and sometimes past, the point where it breaks.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| scalar | FLOAT | 0.00-100–100 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BENDING_MODULE | BENDING_MODULE | — |