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

LoRA Block Weight Custom (Qwen-Image)

All 60 Qwen-Image blocks, typed by hand

By Baldwinzc·Created 4 months ago·Updated 3 months ago· 24
LoRA Block Weight Custom (Qwen-Image)
  • model
  • clip
  • model
  • clip
  • info
lora_name
weights1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
baseline_weight1.00
clip_strength1.00

This is where a Qwen-Image LoRA block sweep stops being an experiment and becomes a recipe you keep. LoRA Block Weight Custom (Qwen-Image) is the "final pass" node: instead of sweeping one block at a time like the single-block node, or burning 300 images on the Batch node, you type the final strengths for all 60 blocks in one comma-separated list and get a patched model you can actually use for generations.

Qwen-Image's transformer is 60 single-stream blocks (B00B59), each with joint image-and-text attention. A normal LoraLoader scales all 60 with one slider; this node gives you a dial per block, from 0 (block fully off) to 2 (block boosted past the LoRA author's intent). If your sweep said "B29 and friends carry the style, B05–B07 do nothing," this node is how you keep one and zero the other. The payoff is the usual block-weight bargain: zeroing near-dead blocks cuts interference when you stack LoRAs and frees capacity for prompt adherence, at no visible cost.

How it works

Mechanically it's the same as the pack's other loader-style nodes: it loads the LoRA, clones the model and CLIP, and applies a per-block strength map by matching the LoRA's keys against Qwen's real transformer_blocks.{N} layout. Non-block input/output layers (img_in, time_in, final_layer and friends) always follow baseline_weight - they have no block index and aren't in your list. The weights field is the entire show.

The inputs that matter

  • weights - 60 comma-separated values in order B00,...,B59. The tooltip says exactly that: 60, count them. A short list is an error; a long one gets its tail ignored. 1.0 is the LoRA as trained, 0 removes a block, anything above 1.0 amplifies it.
  • baseline_weight - the fallback for everything not in your list. Leave at 1.0 for a normal recipe; 0.0 flips the framing to "solo."
  • clip_strength - the LoRA's text-encoder side, -2 to 2. Negative values can actively subtract the LoRA's textual bias, which is a neat trick for quieting a trigger word you don't want.

Outputs are the patched model and clip (drop them into your sampler like any loader) plus an info string reporting how many patches applied. If it reports skipped keys, you've grabbed a LoRA that isn't Qwen-Image - LoRAs are architecture-bound, and the node won't fake it.

Installing it

ComfyUI Manager → search LoraBlockWeight, or the manual route:

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

Restart and it's under the LoraBlockWeight category. No model downloads, no extra pip packages - the pack relies on what ComfyUI already ships.

Where people go wrong

The biggest trap is arriving here with no data. The 60-value list is only useful once you know the ranking - get that from the Batch node's sweep or an XY Plot first. Second: read any block ranking as experiment-specific. The pack's own README warns that an impact ranking is a pixel-level delta for one prompt, seed and resolution - a proxy, not a law. Zero a block because your sweep says so, and re-check on a second prompt before you treat a prune as permanent.

CategoryLoraBlockWeight

Inputs (6)

NameTypeDefaultDescription
modelMODEL
clipCLIP
lora_nameCOMBO0 options:
weightsSTRING1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.060 comma-separated weights in order: B00,...,B59
baseline_weightFLOAT1.000–2
clip_strengthFLOAT1.00-2–2

Outputs (3)

NameTypeDescription
modelMODEL
clipCLIP
infoSTRING