Nodes/ComfyUI-LoraBlockWeight/LoRA Block Weight Group (Qwen-Image)
ComfyUI Node

LoRA Block Weight Group (Qwen-Image)

Stop guessing which Qwen-Image blocks matter — knock whole groups out

By Baldwinzc·Created 4 months ago·Updated 3 months ago· 24
LoRA Block Weight Group (Qwen-Image)
  • model
  • vae
  • positive
  • negative
  • latent_image
  • images
  • info
  • groups_used
  • modes_used
lora_name
seed0
steps25
cfg1.0
sampler_nameeuler
schedulersimple
denoise1.00
groupsB00-B09 B10-B19 B20-B29 B30-B39 B40-B49 B50-B59 B00-B29 B30-B59
modesknockout,solo,full

Qwen-Image is a 20B MMDiT, the model people admire for text rendering and mostly don't run as a daily driver because it's heavy. When one of its LoRAs starts bleeding style where it shouldn't, you don't want to diagnose it by hand - the transformer is 60 blocks deep (B00B59). LoRA Block Weight Group (Qwen-Image) is the node for the second round of that diagnosis: once a single-block sweep has shown you where the action concentrates, you group contiguous blocks and sweep them as one unit, which turns a 300-image affair into a handful of renders.

The whole pack is per-block LoRA weighting for DiTs, ported from the A1111 sd-webui-lora-block-weight technique. The Group variants exist because full single-block sweeps on Qwen are expensive - the author's own demo ran 60 blocks × 5 values = 300 images at 768². Grouping is how you zoom in.

What it does

Same sampler inputs as the Batch node (model, vae, positive, negative, latent_image, seed, steps, cfg, sampler, scheduler, denoise), but instead of a flat block_list you get two text fields:

  • groups - one group per line. A range is B20-B29; commas combine ranges into one group (B00-B05,B40-B49). Ranges can't cross block prefixes, and unknown tags error loudly. The default is a naive even split (B00-B09, B10-B19, ...) with the author's own warning stamped on the tooltip: it's a starting point, not a finding.
  • modes - comma list of column types. knockout = group off, everything else on. solo = group on, everything else off. full = entire LoRA on (your reference). off = entire LoRA off (no-LoRA baseline). Each mode becomes one column of the output.

Outputs mirror the Batch node: images (batched IMAGE), info, and groups_used / modes_used strings that feed the Save Grid node so its labels always match what actually ran.

Why group instead of single-block

The author's Qwen demo makes the case visually: knocking out the 12 highest-MSE blocks strips the LoRA's modern-anime style and falls back toward photographic; knocking out the 12 lowest-MSE blocks is visually indistinguishable from full strength. Qwen spreads its LoRA signal wider than FLUX (top/bottom MSE ratio ≈ 24× vs FLUX's 14×), so the interesting findings live at the group level, not buried in a single block. If you've already done a sparse first round - pick every 5th block, B00,B05,B10,...,B55, 60 images - the Group node is how you confirm a neighbourhood and decide what to zero.

Install

Via ComfyUI Manager, search "LoraBlockWeight". Or:

cd <ComfyUI>/custom_nodes
git clone https://github.com/Baldwinzc/ComfyUI-LoraBlockWeight.git

Restart ComfyUI. No extra dependencies, no model downloads, no key - just numpy, Pillow, torch, which ComfyUI already has. Note it relies on comfy.lora / comfy.sample internals that a ComfyUI refactor could break.

Gotchas

Same caveat as every node in this pack: the knock-out / solo results are one-prompt evidence, not universal truth about a LoRA. And the group default matters less than you'd think - treat it as a scaffold, replace it with what your first sweep tells you. Also remember the CLIP-side limitation applies here too: conditioning is encoded upstream, so the group sweep measures transformer-only contribution.

CategoryLoraBlockWeight

Inputs (14)

NameTypeDefaultDescription
modelMODEL
vaeVAE
lora_nameCOMBO0 options:
positiveCONDITIONING
negativeCONDITIONING
latent_imageLATENT
seedINT00–18446744073709550000
stepsINT251–10000
cfgFLOAT1.00–100
sampler_nameCOMBOeuler44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
schedulerCOMBOsimple9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3
denoiseFLOAT1.000–1
groupsSTRINGB00-B09 B10-B19 B20-B29 B30-B39 B40-B49 B50-B59 B00-B29 B30-B59One group per line. Use D00-D06 for a range, comma to combine ranges (e.g. D00-D06,S20-S25). Default is a naive even split with no prior knowledge - edit per LoRA once a first sweep shows where the effect concentrates.
modesSTRINGknockout,solo,fullComma list of column types. knockout = group off, others on. solo = group on, others off. full = everything on (LoRA reference). off = everything off (no-LoRA reference). Each entry becomes one column in the output grid.

Outputs (4)

NameTypeDescription
imagesIMAGE
infoSTRING
groups_usedSTRING
modes_usedSTRING