Nodes/SP-Nodes/FluxInspireLbw_Batch
ComfyUI Node

FluxInspireLbw_Batch

Sweep LoRA block weights across Flux's transformer

By bananasss00·Created 2 years ago·Updated 10 days ago· 20
FluxInspireLbw_Batch
    • block_vector
    • blocks_range
    • summary
    block_strength2.5
    double_blocksfalse
    single_blocksfalse
    force_double_blocks
    force_single_blocks
    forced_block_strength1.0
    reverse_modefalse

    LoRA Block Weight (LBW) is an old idea, going back to an A1111 extension for SD 1.5: instead of applying a LoRA at one global strength, you apply it per-block, because different blocks of the network tend to control different things - one might carry composition, another style, another fine detail. Set the right block strengths and you can keep the pose a LoRA taught without dragging its color palette along too. The "Inspire" in this node's name nods to ltdrdata's Inspire Pack, which built the best-known ComfyUI implementation of the same idea for SD 1.5/SDXL's block layout - this SP-Nodes version brings the concept to Flux instead, mapped onto Flux's own transformer structure of 19 double-stream blocks (which process image and text jointly) and 38 single-stream blocks (which process the combined stream afterward), rather than the old UNet's IN/MID/OUT layout.

    How it works

    This node doesn't apply a LoRA itself - it generates block-weight configurations that a compatible block-aware LoRA loader elsewhere in your graph then uses. And "Batch" means exactly that: it produces a whole set of different configurations in one go, built for sweeping through which blocks actually matter for a given LoRA rather than committing to one guess.

    • block_strength (0–20, default 2.5) - the base strength applied to a block when it's enabled.
    • double_blocks / single_blocks (booleans) - the coarse switches: turn LoRA application on or off for the entire double-block group or single-block group at once.
    • force_double_blocks / force_single_blocks - comma-separated block indices that override the coarse toggles for specific blocks. The node's own tooltip gives the exact format: 1,5,6,8.
    • forced_block_strength (0–20, default 1) - a separate strength dial that applies specifically to whatever you listed in the force fields, independent of block_strength.
    • reverse_mode - flips the selection, so instead of "apply to these blocks," you get "apply to everything except these blocks."

    Outputs: block_vector and blocks_range are both lists - the actual sweep, one entry per configuration generated - and summary is a single string readout, useful for sanity-checking what a sweep is about to run before you burn GPU time on it.

    How to install it

    Through ComfyUI Manager: search "SP-Nodes," install, restart. Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/bananasss00/ComfyUI-SP-Nodes
    

    Restart ComfyUI afterward. This node needs a Flux LoRA and a compatible block-weight-aware loader downstream to actually do anything with its output - it only produces the configuration.

    Common issues

    The most common trip-up is the block index list: match the tooltip's format exactly (1,5,6,8, no stray spaces) and stay within Flux's real block counts - 19 double blocks, 38 single blocks - since an out-of-range index is a straightforward way to get a config that silently does nothing useful. And if you were expecting one clean, fixed vector rather than a batch of sweep configurations, you want this node's sibling instead - FluxInspireLbw_BlockVectorPreset - which produces exactly one block_vector rather than a whole set of them.

    CategorySP-Nodes

    Inputs (7)

    NameTypeDefaultDescription
    block_strengthFLOAT2.50–20
    double_blocksBOOLEANfalse
    single_blocksBOOLEANfalse
    force_double_blocksSTRINGexample: 1,5,6,8
    force_single_blocksSTRINGexample: 1,5,6,8
    forced_block_strengthFLOAT1.00–20
    reverse_modeBOOLEANfalse

    Outputs (3)

    NameTypeDescription
    block_vectorSTRING
    blocks_rangeSTRING
    summarySTRING