Nodes/ComfyUI Inspire Pack/XY Input: LoRA Block Weight
ComfyUI Node Runs on cloud

XY Input: LoRA Block Weight

LoRA Block Weight (Inspire): find out which of a LoRA's blocks actually matter

By ltdrdata·Created 3 years ago·Updated 9 months ago· 805
XY Input: LoRA Block Weight
    • X (vectors)
    • Y (effect_compares)
    category_filter
    lora_name
    strength_model1.00
    strength_clip1.00
    inversefalse
    seed0
    A1.00
    B1.00
    preset
    block_vectorsSD-NONE/SD-ALL SD-ALL/SD-ALL SD-INS/SD-ALL SD-IND/SD-ALL SD-INALL/SD-ALL SD-MIDD/SD-ALL SD-MIDD0.2/SD-ALL SD-MIDD0.8/SD-ALL SD-MOUT/SD-ALL SD-OUTD/SD-ALL SD-OUTS/SD-ALL SD-OUTALL/SD-ALL
    heatmap_palette
    heatmap_alpha0.80
    heatmap_strength1.50
    xyplot_mode

    Block weighting a LoRA is powerful, but the honest problem is you never know which blocks to touch. This is the node that answers that. It feeds the Efficiency Nodes' XY Plot with a set of block-weight vectors so you can generate a whole grid - same prompt, same seed, one row per vector - and see at a glance which blocks change the image and which do nothing. It turns "guess a vector, regenerate, squint, repeat" into one render you read off a wall.

    If you've ever wanted just the style of a character LoRA without its pose, or you're trying to understand why a LoRA fights your composition, this is how you actually learn the layout instead of copying someone else's presets on faith.

    How it works

    You give it a list of block vectors in block_vectors - the default is a stack of preset pairs like SD-INS/SD-ALL, SD-MIDD/SD-ALL, SD-OUTS/SD-ALL, each comparing one region of blocks against the full LoRA. It outputs two XY axes, X (vectors) and Y (effect_compares), which you wire into an Efficiency Nodes XY Plot. When that runs, you get the grid.

    The interesting extra is xyplot_mode: Simple just renders each vector, Diff shows the difference from the baseline, and Diff+Heatmap overlays a heatmap so the regions that changed light up. The heatmap_palette (viridis, magma, and friends), heatmap_alpha, and heatmap_strength control that overlay. It's a genuinely nice way to see a LoRA's structure rather than reason about it.

    The inputs and outputs that matter

    • lora_name - the LoRA you're profiling.
    • block_vectors - the multiline list of vectors/pairs to sweep. This is the real control.
    • xyplot_mode - Simple, Diff, or Diff+Heatmap; the heatmap mode is why you'd use this over a plain XY setup.

    Outputs are X (vectors) and Y (effect_compares) - both feed the Efficiency Nodes XY Plot node.

    Installing it

    Get the Inspire Pack via ComfyUI Manager (search "Inspire Pack", install, restart), or manually:

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

    Restart afterward. The requirements.txt matters more here than for most Inspire nodes - the heatmap rendering leans on matplotlib, which is in there, so let Manager install it (or run pip install -r requirements.txt yourself).

    Where people get tripped up

    This node does nothing on its own. It's an input for someone else's plot: you need the Efficiency Nodes pack (jags111's fork) installed, and the pack's README notes you want a build from after September 3rd for block-weight support. The X and Y outputs only make sense wired into that pack's XY Plot with the dependencies connected - miss that and you'll have a node that produces two mystery outputs and no grid. Set the Efficiency side up first, then hang this off it.

    CategoryInspirePack/LoraBlockWeight

    Inputs (14)

    NameTypeDefaultDescription
    category_filterCOMBO1 options: All
    lora_nameCOMBO0 options:
    strength_modelFLOAT1.00-10–10
    strength_clipFLOAT1.00-10–10
    inverseBOOLEANfalse
    seedINT00–18446744073709550000
    AFLOAT1.00-10–10
    BFLOAT1.00-10–10
    presetCOMBO123 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, +117
    block_vectorsSTRINGSD-NONE/SD-ALL SD-ALL/SD-ALL SD-INS/SD-ALL SD-IND/SD-ALL SD-INALL/SD-ALL SD-MIDD/SD-ALL SD-MIDD0.2/SD-ALL SD-MIDD0.8/SD-ALL SD-MOUT/SD-ALL SD-OUTD/SD-ALL SD-OUTS/SD-ALL SD-OUTALL/SD-ALL
    heatmap_paletteCOMBO5 options: viridis, magma, plasma, inferno, cividis
    heatmap_alphaFLOAT0.800–1
    heatmap_strengthFLOAT1.500–10
    xyplot_modeCOMBO3 options: Simple, Diff, Diff+Heatmap

    Outputs (2)

    NameTypeDescription
    X (vectors)XY
    Y (effect_compares)XY