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

Create Hook LoRA Block Weight

Per-Block LoRA Scaling That Can Change Mid-Sample

By ltdrdata·Created 3 years ago·Updated about 14 hours ago· 831
Create Hook LoRA Block Weight
  • lbw_model
  • prev_hooks
  • HOOKS
◄strength_model1.00►
◄strength_clip1.00►

LoRA block weight is a niche power tool inherited from A1111: instead of applying a LoRA at a flat strength, you give each of the model's blocks its own multiplier. Turn the output blocks down and the texture gets softer; turn the middle blocks down and the composition loosens. Inspire has shipped that for ages. This node is the version that hands the weights to ComfyUI's own hook system, which quietly buys you something the flat nodes can't do: a block weight vector that changes partway through sampling.

The chain you're joining

Inspire's LoRA block weight family covers the whole lifecycle:

  • Make LoRA Block Weight produces an LBW_MODEL - the LoRA plus a block-weight vector, without touching a model.
  • Apply LoRA Block Weight applies it to MODEL and CLIP directly.
  • Save / Load LoRA Block Weight round-trips it as a .lbw.safetensors file, so a vector you tuned can be reused.
  • Create Hook LoRA Block Weight - the one this page is about - converts that LBW_MODEL into HOOKS.

Why bother converting? Because ComfyUI's hook nodes let you schedule. Set Hook Keyframes attaches hooks to specific points of the sampling schedule, so a weight vector can be strong at the start and released later, which is the kind of control an A1111-style global apply simply doesn't express.

How it works under the hood

A block-weight vector isn't one number - every block can have its own ratio, so the LoRA's patches get grouped by ratio, and each group becomes its own weight hook. Then strength_model and strength_clip do what they do on core's Create Hook LoRA: they're the master multipliers, and each group's ratio scales against them. Hooks returned by this node are combined with anything on prev_hooks, which is how you stack one of these behind an existing hook chain instead of clobbering it.

One detail from the implementation worth knowing: if you set both strength_model and strength_clip to 0, the node returns prev_hooks untouched rather than a null hook. That's a clean way to A/B a workflow without rewiring.

Inputs and outputs

  • lbw_model - the LBW_MODEL from Make LoRA Block Weight or Load LoRA Block Weight.
  • strength_model - master scale for the UNet side, default 1.0, range -20 to 20.
  • strength_clip - same for the text encoder. Pulling this to 0 is a standard trick when a block-tuned LoRA is bleeding into prompt interpretation.
  • prev_hooks (optional) - an existing HOOKS chain to stack onto.
  • HOOKS out - straight into Set CLIP Hooks, or into a Set Hook Keyframes → Cond Set Props chain for schedule control.

The one thing you'll get wrong

Double application. The README is explicit: use the hooks with a MODEL and CLIP the LoRA is not applied to. If you also load the same LoRA with LoRA Loader (Block Weight) or Apply LoRA Block Weight in the same graph, the LoRA lands twice and your careful per-block vector turns into soup. The hook is the delivery mechanism, not an addition to one.

The second gotcha is version-adjacent: this leans on ComfyUI's core hook nodes, which ship with ComfyUI itself rather than with the pack. On an old install you simply won't see Set CLIP Hooks or Set Hook Keyframes. Update ComfyUI rather than hunting for a missing node pack.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/ltdrdata/ComfyUI-Inspire-Pack
pip install -r ComfyUI-Inspire-Pack/requirements.txt

Or use ComfyUI Manager (search "ComfyUI Inspire Pack") and restart. No extra models, no extra node packs - block weight works on whatever LoRA you already have. The pack's requirements are matplotlib, cachetools, numpy, webcolors, opencv-python, so if the nodes fail to appear at all, the terminal log is your friend; a dependency conflict (numpy and opencv are the usual suspects after a ComfyUI update) shows up there as an import error long before it shows up in the UI.

Is it worth the effort?

Honestly: block weight is for people chasing a specific effect with a specific LoRA, not a general upgrade. Most LoRAs are fine at one strength. But if a character LoRA keeps dragging style along with it, cutting the output blocks while leaving the ones that carry identity is a real, repeatable fix - and doing it as a hook instead of a permanent apply is what lets you release the style later in the schedule.

CategoryInspirePack/LoraBlockWeight

Inputs (4)

NameTypeDefaultDescription
lbw_modelLBW_MODEL—
strength_modelFLOAT1.00-20–20—
strength_clipFLOAT1.00-20–20—
prev_hooksoptHOOKS—

Outputs (1)

NameTypeDescription
HOOKSHOOKS—