Nodes/ComfyUI Inspire Pack/Apply LoRA Block Weight
ComfyUI Node Runs on cloud

Apply LoRA Block Weight

Apply a per-block-weighted LoRA to your model and CLIP

By ltdrdata·Created 3 years ago·Updated 9 months ago· 805
Apply LoRA Block Weight
  • model
  • clip
  • lbw_model
  • MODEL
  • CLIP
strength_model1.00
strength_clip1.00

This node applies an LBW_MODEL - a LoRA that's been weighted block-by-block - onto your MODEL and CLIP. It's the second half of a two-step flow: you build the block-weighted LoRA with Make LoRA Block Weight, then apply it here. If you just want to load a LoRA with block weights in one shot, the LoRA Loader (Block Weight) node does that; this Make-then-Apply split exists for when you want to save the weighted LoRA to a file and reuse it, or apply the same one to several models.

So what's block weight, and why bother? A LoRA is applied across all of the UNet's blocks equally by default. Block weighting lets you set a different strength for each block - and different blocks do different jobs. The community rule of thumb, from the technique's SD-webui days: the early (input) blocks mostly govern composition and structure, the end (output) blocks mostly govern color and fine style, and the middle handles a bit of everything. Dial those independently and you can do things a flat LoRA weight can't.

The practical payoffs people chase with it: take only a LoRA's composition and drop its color palette (or the reverse); tame a style LoRA that "sees everything as its subject" so it stops forcing the trained object into every image; fix a character LoRA that comes with the wrong body proportions by lowering the blocks responsible; or deliberately break a LoRA in interesting ways. It's a scalpel for LoRAs that are almost right but overreaching.

How it works

Make LoRA Block Weight produces an LBW_MODEL from a LoRA plus a block-weight vector (the per-block strengths). This node takes that LBW_MODEL and patches it into your MODEL and CLIP, scaled by two overall strengths. Think of the block vector as the shape of the LoRA's influence across the network, and the strength values here as the overall volume. The output is a modified model and CLIP you sample with as normal.

The inputs and outputs that matter

  • model (MODEL) and clip (CLIP) - what you're applying the LoRA onto.
  • lbw_model (LBW_MODEL) - the block-weighted LoRA, from Make LoRA Block Weight. This is the whole reason the node exists.
  • strength_model (default 1.0) - overall strength of the LoRA on the UNet. Same meaning as a normal LoRA loader's model strength, sitting on top of the per-block shaping.
  • strength_clip (default 1.0) - overall strength on the text encoder.

Outputs: MODEL and CLIP, both with the block-weighted LoRA applied. Chain them into your sampler and prompt encode.

How to install it

ComfyUI Manager: search ComfyUI Inspire Pack, install, restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/ltdrdata/ComfyUI-Inspire-Pack

then restart. It's from Dr.Lt.Data (ComfyUI-Manager, Impact Pack). The Inspire README credits the block-weight syntax and idea to hako-mikan's original sd-webui-lora-block-weight, so if you've used that A1111 extension the concept carries straight over.

Common issues & troubleshooting

Nothing seems to change vs a normal LoRA. If your block vector is all 1.0, block weighting is doing nothing - that's just a flat LoRA. The effect only appears when blocks differ. Set it on the Make LoRA Block Weight node upstream, not here.

No visible effect at all. Both strength_model and strength_clip scale on top of the block vector - if either is 0 (or the LBW model is empty), you get nothing. Start at 1.0 and adjust.

Which blocks do what? There's no universal map, and it varies by LoRA, but the working heuristic holds: lower the early blocks to weaken composition/pose while keeping style, lower the end blocks to keep composition while dropping the color/fine-style, and use an XY plot to find the split for a given LoRA rather than guessing. Inspire has an XY Input: LoRA Block Weight node for exactly that sweep.

I want to reuse this weighted LoRA. That's the point of the Make/Apply split - Save LoRA Block Weight writes the LBW_MODEL to a .lbw.safetensors file, and Load LoRA Block Weight reads it back, so you don't rebuild the vector every time.

It applied to the model but not the prompt behavior. Check strength_clip - the CLIP side is weighted separately from the model side, and leaving it low means the text-encoder half of the LoRA barely fires.

CategoryInspirePack/LoraBlockWeight

Inputs (5)

NameTypeDefaultDescription
modelMODEL
clipCLIP
strength_modelFLOAT1.00-10–10
strength_clipFLOAT1.00-10–10
lbw_modelLBW_MODEL

Outputs (2)

NameTypeDescription
MODELMODEL
CLIPCLIP