LoRA Block Weight Custom (FLUX.1)
The manual gearbox for FLUX LoRAs
- model
- clip
- model
- clip
- info
LoRA Block Weight Custom is the last node you use in a block-weight workflow, not the first. It's the "final pass" - the place where a sweep you ran on the Batch or single-block nodes becomes a hand-tuned recipe: keep the blocks that carry your LoRA's style, zero the dead weight, and stop the LoRA from bleeding onto everything else.
FLUX.1's transformer is 57 blocks: 19 double-stream blocks (D00–D18) plus 38 single-stream blocks (S00–S37). A normal LoraLoader gives you one strength slider that scales all 57 together. This node gives you one weight per block, typed as a comma-separated list. Same idea as Inspire Pack's or KJ Nodes' FLUX block weighters - the technique people used to hunt down the "face layer" of a FLUX LoRA - but built directly around FLUX's real block layout, and it belongs to the same pack as the sweep nodes that tell you what to type.
How it works
It loads your LoRA and then, instead of applying one scalar, it builds a per-block strength map and patches the transformer's LoRA keys block by block, using each model's real state-dict layout (regex-matched against the key names) so D05 means the fifth double block, not a guess. Non-block layers like img_in and final_layer always follow baseline_weight - they don't get indices, so they're never sweep targets and this node doesn't touch them either. The CLIP side is still handled through clip_strength.
The inputs that matter
- weights - 57 comma-separated values in order
D00,...,S37. The tooltip is blunt about it: that's exactly 57. Count carefully; a short list errors out, a long one is ignored at the tail. 1.0 is full, 0 is off, and values above 1.0 (up to 2.0) boost a block past what the LoRA author intended - the trick for getting more of a look. - baseline_weight - what every untargeted block sits at. 1.0 means "knock-out" framing (you're specifying what's different from full); 0.0 means "solo" framing. For a final recipe you'll basically leave it at 1.0 and type actual strengths.
- clip_strength - the LoRA's text-encoder contribution, applied to the CLIP. Negative values subtract the LoRA's textual bias, which is a real trick for un-teaching a trigger word.
Where you plug it in
It's a drop-in LoraLoader replacement: model and clip in, patched model and clip out, straight into your sampler. The third output, info (a STRING), tells you how many LoRA patches were applied and, if some didn't match any block, shows the first skipped key - the fastest way to catch a LoRA that isn't meant for FLUX at all.
Installing it
Via ComfyUI Manager, search LoraBlockWeight and install; or the manual route:
cd <ComfyUI>/custom_nodes
git clone https://github.com/Baldwinzc/ComfyUI-LoraBlockWeight.git
then restart ComfyUI. No model downloads, no extra Python packages - the README's dependencies (numpy, Pillow, torch) are already what ComfyUI runs on.
The honest gotchas
A full sweep to learn the weights is 285 images (57 × 5). That's what the Batch node is for. Coming to the Custom node first with no data is like tuning a radio by feel - fine if the LoRA is well-behaved, slow if it isn't. And read any block ranking you copy from someone as experiment-specific: an MSE ranking is a pixel-level delta for one prompt, seed and resolution, a proxy rather than a law. Zero a block because your sweep says so, not because a stranger's did.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| clip | CLIP | — | |
| lora_name | COMBO | 0 options: | |
| weights | STRING | 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 | 57 comma-separated weights in order: D00,...,S37 |
| baseline_weight | FLOAT | 1.000–2 | — |
| clip_strength | FLOAT | 1.00-2–2 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| model | MODEL | — |
| clip | CLIP | — |
| info | STRING | — |