Nodes/ComfyUI-LoRA-Block-Filter/Flux LoRA Filter (Blocks)
ComfyUI Node

Flux LoRA Filter (Blocks)

Flux LoRA filtering, the loader half

By DanrisiUA·Created 4 months ago·Updated 2 months ago· 33
Flux LoRA Filter (Blocks)
  • model
  • clip
  • block_weights
  • model
  • clip
  • info
lora_name
strength_model1.00
strength_clip1.00
enabledtrue
folder_path
lora_name_override

Flux is the model where "just lower the LoRA strength" stops working, because a Flux LoRA is a 12B transformer's worth of influences in one file and they don't all need to apply evenly. Flux LoRA Filter (Blocks) is the node that loads a Flux LoRA and applies it selectively - dropping or scaling whole blocks and layer types instead of hitting everything with the same multiplier. It's the loader half of the ComfyUI-LoRA-Block-Filter pack (by Danrisi, the Anima "UltraReal" fine-tuner), and it works with Flux LoRA Block Weight, which supplies the recipe.

How it works

The filter takes the block configuration from the Block Weight node and walks every key in the LoRA file, matching it against Flux's structure: double_blocks.N.img_attn/img_mlp/txt_attn/txt_mlp (8 double blocks) and single_blocks.N.linear (24 single blocks). Each key gets a multiplier of per-block value × per-layer-type value, and then:

  • keys with multiplier 0 are dropped - they're never patched at all, so a fully suppressed block costs you nothing,
  • everything else is patched at strength × multiplier.

Unmatched keys pass through at full strength, which keeps any oddball tensors in the LoRA working normally. The img-versus-txt split is the thing to internalize here: damp the txt_* layers and a style-heavy Flux LoRA leaks less into the prompt; cut the image layers and you lose the subject. no_style_leak and character_detail are the two presets that encode exactly that tradeoff.

Inputs

  • model and clip - from your Flux checkpoint (or the previous filter if you're chaining).
  • lora_name - dropdown of your models/loras folder.
  • strength_model / strength_clip - the usual global weights, -10 to 10. Strength and block weight multiply together.
  • block_weights - the FLUX_BLOCK_WEIGHTS output from a Flux LoRA Block Weight node. This is the whole point; without it the filter applies everything at plain strength.
  • enabled - bypass toggle; off means your model and clip pass through untouched.

The optional folder_path and lora_name_override are for pulling LoRAs from outside the standard folder. Ignore them until you need them.

Outputs

model and clip go straight to your sampler. info is a STRING reporting how many keys were applied and how many got filtered - the fastest way to sanity-check that your block weights are actually doing something. If it says "0 filtered," your configuration isn't matching anything.

Install

ComfyUI Manager has it under the pack title, or:

cd ComfyUI/custom_nodes
git clone https://github.com/DanrisiUA/ComfyUI-LoRA-Block-Filter

Restart, find Smart LoRA in your menu. No requirements.txt, no model downloads - the pack uses ComfyUI's built-in comfy.lora machinery, so there's no dependency tangle.

Where people get burned

The "LoRA not found" info string means the filename isn't resolving - usually a typo or the file living outside models/loras. The subtler failure is a LoRA trained with non-standard key naming: Flux's naming is well-established, but a sloppy conversion can produce keys the regex doesn't match, and then every block passes at full strength no matter what your sliders say. Watch the info count. Also remember the base-model rule from the Flux era: a Flux LoRA is architecture-locked - this node only filters Flux LoRAs on Flux models, it won't magically make an SDXL LoRA work.

CategorySmart LoRA

Inputs (9)

NameTypeDefaultDescription
modelMODEL
clipCLIP
lora_nameCOMBO0 options:
strength_modelFLOAT1.00-10–10
strength_clipFLOAT1.00-10–10
block_weightsFLUX_BLOCK_WEIGHTS
enabledBOOLEANtrue
folder_pathoptSTRING
lora_name_overrideoptSTRING

Outputs (3)

NameTypeDescription
modelMODEL
clipCLIP
infoSTRING