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

Make LoRA Block Weight

Build a block-weighted LoRA you can save and reuse

By ltdrdata·Created 3 years ago·Updated 9 months ago· 805
Make LoRA Block Weight
  • model
  • clip
  • lbw_model
  • populated_vector
category_filter
lora_name
inversefalse
seed0
A4.00
B1.00
preset
block_vector1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1
bypassfalse

This is the "don't apply it yet" version of the block-weight loader. Instead of patching a LoRA onto your MODEL and CLIP right there, it computes the block-weighted LoRA and hands it back as a separate LBW_MODEL object. You then either apply it later with Apply LoRA Block Weight, or bake it to a file with Save LoRA Block Weight.

Why split it up? Block weighting is a patch across a LoRA's layers - some blocks on, some off - and figuring out the right vector is fiddly work you don't want to redo every run. Producing an LBW_MODEL lets you compute it once and reuse it: save it to disk, reload it, apply it to whatever checkpoint you like. If you've landed on a block vector that strips a character LoRA down to just its style, MakeLBW plus SaveLBW turns that tuning into a reusable .lbw.safetensors file instead of a config you copy-paste around. If you just want the effect applied immediately, use LoRA Loader (Block Weight) instead - this node is for when you want the block-weighted result as a portable thing.

How it works

Same machinery as the loader, minus the "apply" step. The block_vector is a per-block multiplier list (or pick a preset like SD-MIDD or SD-OUTS), and the values can be plain numbers, R for a random 0/1 seeded by seed, or A/B/a/b to slot in the A and B inputs. It reads your model, clip, and the chosen lora_name, resolves the vector, and emits the result as LBW_MODEL.

The inputs and outputs that matter

  • lora_name - the LoRA to bake. Empty dropdown means nothing in models/loras.
  • block_vector / preset - the per-block weights that define this LBW.
  • A, B, seed - only relevant if the vector uses A, B, or R.

Outputs: lbw_model (LBW_MODEL - feed to Apply LoRA Block Weight or Save LoRA Block Weight) and populated_vector, the resolved vector string.

Installing it

ComfyUI Manager: search "Inspire Pack", install, restart. Or manually:

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

Restart afterward. There's a requirements.txt the Manager handles automatically; manual installs should run pip install -r requirements.txt in ComfyUI's Python. It ships in Dr.Lt.Data's Inspire Pack, the companion to the Impact Pack.

Where people get tripped up

The output is an LBW_MODEL, not a MODEL - you can't wire it straight into a KSampler. It has to go through Apply LoRA Block Weight (which puts it back onto a real MODEL and CLIP) or Save LoRA Block Weight first. That's the point of the node, but it catches people who expected the same output as the plain loader. And as with all block weighting, the preset vectors assume an SD 1.5 / SDXL block layout; on a different architecture the block count changes and you'll be tuning the vector by hand.

CategoryInspirePack/LoraBlockWeight

Inputs (11)

NameTypeDefaultDescription
modelMODEL
clipCLIP
category_filterCOMBO1 options: All
lora_nameCOMBO0 options:
inverseBOOLEANfalseApply the following weights for each block: True: 1 - weight False: weight
seedINT00–18446744073709550000
AFLOAT4.00-10–10
BFLOAT1.00-10–10
presetCOMBO42 options: Preset, SD-NONE:0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, SD-ALL:1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, SD-INS:1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0, SD-IND:1,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0, SD-INALL:1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0, +36
block_vectorSTRING1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1
bypassBOOLEANfalse

Outputs (2)

NameTypeDescription
lbw_modelLBW_MODEL
populated_vectorSTRING