LoRA Block Weight Group (Qwen-Image)
Stop guessing which Qwen-Image blocks matter — knock whole groups out
- model
- vae
- positive
- negative
- latent_image
- images
- info
- groups_used
- modes_used
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 (B00–B59). 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.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| vae | VAE | — | |
| lora_name | COMBO | 0 options: | |
| positive | CONDITIONING | — | |
| negative | CONDITIONING | — | |
| latent_image | LATENT | — | |
| seed | INT | 00–18446744073709550000 | — |
| steps | INT | 251–10000 | — |
| cfg | FLOAT | 1.00–100 | — |
| sampler_name | COMBO | euler | 44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38 |
| scheduler | COMBO | simple | 9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3 |
| denoise | FLOAT | 1.000–1 | — |
| groups | STRING | B00-B09 B10-B19 B20-B29 B30-B39 B40-B49 B50-B59 B00-B29 B30-B59 | One 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. |
| modes | STRING | knockout,solo,full | Comma 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)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| info | STRING | — |
| groups_used | STRING | — |
| modes_used | STRING | — |