- model
- clip
- bending_module
- MODEL
- CLIP
Every LoRA is a set of small matrices that get patched onto the base model's weights. LoRA Bending grabs all of those matrices the moment they load and runs a bending module across them before the LoRA ever touches the model. Same "bending" idea as the UNet nodes - intercept something and mutate it - just aimed at the LoRA's own weights instead of a layer's activations.
This node replaces the stock Load LoRA node: same MODEL + CLIP in, same MODEL + CLIP out, plus one extra BENDING_MODULE input. It's the pack's answer to "what if I bent the LoRA rather than the base model," and it's genuinely the easiest entry point into the pack, because you don't have to learn a single path string to use it. Feed it any module from the (Bending) family and the effect applies everywhere the LoRA applies.
How it works
Under the hood it's the normal ComfyUI LoRA pipeline - load the file, map keys, convert, load into model and clip - with one step inserted in the middle. Before the patches are applied, every loaded LoRA component's weight tensor gets pushed through your bending module:
bent_0 = bending_module(w[0].clone().detach()...)
loaded[k] = type(v)(v.loaded_keys, (bent_0,) + w[1:])
So a Multiply Scalar Module (Bending) at 0 zeroes the LoRA's contribution entirely (ablation), a Rotate Module (Bending) spins each LoRA matrix, and so on. Because it bends all components uniformly, effects are blunt and global - which is exactly the point of this node. Want surgical, one-component bends? That's the sibling node, LoRA Bending (list).
Inputs and outputs
- model (
MODEL) and clip (CLIP) - wire them straight from your checkpoint loader, as with Load LoRA. - lora_name - dropdown of every
.safetensorsin yourmodels/lorasfolder. - bending_module (
BENDING_MODULE) - any of the (Bending) module nodes: Multiply Scalar, Add Scalar, Threshold, Rotate, Scale, Sobel, or Add Noise.
Outputs are MODEL and CLIP, ready for the sampler or the next LoRA in the chain.
Installing
The pack installs once and gives you every node:
cd ComfyUI/custom_nodes
git clone https://github.com/abuzreq/ComfyUI-Model-Bending
Restart ComfyUI and refresh the browser. Or search ComfyUI-Model-Bending in ComfyUI Manager. Dependencies are just kornia and scikit-learn; there are no model downloads. Ignore the README's clone snippet that names the target folder ComfyUI-Web-Bend-Demo - clone as ComfyUI-Model-Bending.
Where people get tripped up
Start with mild values. A multiply of 2 on a LoRA that's already pushing a style hard can blow past into pure noise, and at that point the LoRA's not "bent," it's a brick. Also know that this bends the LoRA weights, not the base-model activations - if you bend the base model and the LoRA with opposite effects, you can cancel yourself out. Test one at a time. And if the outputs look untouched, check that your bending module isn't at its identity default (Multiply Scalar at 1, Rotate at 0, Threshold at 0 are all pass-throughs). This is an experimental tinkerer's tool, so treat results as things to discover rather than bugs to fix.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| clip | CLIP | — | |
| lora_name | COMBO | 0 options: | |
| bending_module | BENDING_MODULE | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |
| CLIP | CLIP | — |