Nodes/ComfyUI-LoraBlockWeight/LoRA Block Weight Batch (FLUX.1)
ComfyUI Node

LoRA Block Weight Batch (FLUX.1)

The all-in-one FLUX.1 LoRA sweep

By Baldwinzc·Created 4 months ago·Updated 3 months ago· 24
LoRA Block Weight Batch (FLUX.1)
  • model
  • vae
  • positive
  • negative
  • latent_image
  • images
  • info
  • blocks_used
  • values_used
lora_name
seed0
steps25
cfg1.0
sampler_nameeuler
schedulersimple
denoise1.00
block_listD00,D01,D02,D03,D04,D05,D06,D07,D08,D09,D10,D11,D12,D13,D14,D15,D16,D17,D18,S00,S01,S02,S03,S04,S05,S06,S07,S08,S09,S10,S11,S12,S13,S14,S15,S16,S17,S18,S19,S20,S21,S22,S23,S24,S25,S26,S27,S28,S29,S30,S31,S32,S33,S34,S35,S36,S37
value_list0,0.25,0.5,0.75,1.0
baseline_weight1.00

The single-block FLUX.1 node is a scalpel, but it's designed to be driven by an XY Plot, which means installing Efficiency Nodes and wiring up the axes. LoRA Block Weight Batch (FLUX.1) skips all that: it's a self-contained sweep machine. Feed it a model, a VAE, conditioning and a latent, and it loops over every (block, value) pair internally - patching, sampling, decoding, and stacking the results into one batched IMAGE for you. No external orchestration required.

It exists because the author's actual research workflow needed 95–285 images per sweep, and wiring that through a plot node was the wrong shape. This is the node behind every demo grid in the README.

The inputs

You get the full sampler stack plus the sweep controls:

  • model, vae, positive, negative, latent_image - the usual KSampler ingredients.
  • seed, steps, cfg, sampler_name (default euler), scheduler (default simple), denoise - set these like you would on a KSampler for FLUX.1.
  • block_list - comma-separated block tags, defaulting to all 57 (D00..S37). This is the input you'll actually trim.
  • value_list - the strengths to try per block, default 0,0.25,0.5,0.75,1.0.
  • baseline_weight - 1.0 for knock-out mode (each block removed in turn), 0.0 for solo mode (each block in isolation).

Outputs are four: images (the batched IMAGE, in block-major, value-minor order), an info STRING summarizing the sweep, and blocks_used / values_used - the exact strings you ran, which you feed straight into the Save Grid node so the labels can't drift out of sync.

The honest cost

A full sweep is 57 blocks × 5 values = 285 images. On a consumer card that's hours. The README's first-round recipe scans just the 19 double blocks (95 images) and treats that as enough signal to start, expanding to the single blocks only if you need more. There's also a sparse 10–12 block recipe in USAGE.md if you want the active neighbourhood in under 100 renders. Don't skip this planning step; a full sweep on a 4070 is a "start it before bed" operation, not a "let me tweak the prompt and rerun" one.

The one real limitation

Read this twice: CLIP-side LoRA patches don't apply here. The positive/negative conditioning is already encoded upstream, so the node's contribution is transformer-only. If your LoRA's effect lives partly in the text encoder, the batch result understates it - for a complete picture, use the single-block node with an XY Plot instead, where the CLIP side is patched via clip_strength.

Install and dependencies

Via ComfyUI Manager, search "LoraBlockWeight". Or:

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

Restart ComfyUI. No extra dependencies beyond what ComfyUI already ships (numpy, Pillow, torch), no model downloads, no API key. The pack leans on stable comfy.lora / comfy.sample internals, so a ComfyUI refactor can break loading - check the repo issues if a future update stops it from working.

Gotchas

Out-of-range or mistyped block tags raise a loud error rather than silently producing a wrong grid - that's deliberate, and it'll save you from mislabeled results. And don't trust a single sweep's ranking as gospel: MSE is a pixel-delta proxy for one prompt, seed, and resolution. Treat the sweep as a starting map, not a permanent prune list.

CategoryLoraBlockWeight

Inputs (15)

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
block_listSTRINGD00,D01,D02,D03,D04,D05,D06,D07,D08,D09,D10,D11,D12,D13,D14,D15,D16,D17,D18,S00,S01,S02,S03,S04,S05,S06,S07,S08,S09,S10,S11,S12,S13,S14,S15,S16,S17,S18,S19,S20,S21,S22,S23,S24,S25,S26,S27,S28,S29,S30,S31,S32,S33,S34,S35,S36,S37Comma-separated block tags. Defaults to all 57 (D00..S37). Trim for faster first round.
value_listSTRING0,0.25,0.5,0.75,1.0Comma-separated strength values.
baseline_weightFLOAT1.000–2Knock-out: 1.0. Solo: 0.0.

Outputs (4)

NameTypeDescription
imagesIMAGE
infoSTRING
blocks_usedSTRING
values_usedSTRING