ComfyUI Node

FLUX LoRA Auto Loader

It reads the weights and decides for you

By capitan01R·Created 5 months ago·Updated 5 months ago· 28
FLUX LoRA Auto Loader
  • model
  • model
  • analysis_report
lora_name
global_strength0.75

Most LoRA loaders ask you to find the strength. The FLUX LoRA Auto Loader from capitan01R/Comfyui-flux2klein-Lora-loader decides it for you - by reading the LoRA file's own weights and working out which layers actually carry training signal. You get one knob, global_strength, and it does the rest.

The pitch: model in, patched MODEL out, plus an analysis_report string that tells you what it found. It's a self-contained version of the pack's two-node setup (Auto Strength → Loader collapsed into one). For a beginner it's genuinely the friendliest entry point to this pack - there's nothing to calibrate, and the analysis report is a free education in what your LoRA actually contains.

Why the per-layer thing exists

Klein LoRAs aren't trained evenly. Some layers absorb most of the training signal and some barely move, and a single global strength value applies the same pressure to all of them. This node computes a per-layer strength so that heavily-trained layers don't get over-applied while lightly-trained ones get under-applied. That's the "forensic weight analysis" the README talks about, and it's the mechanism worth understanding:

  • It recomputes the effective delta weight for each layer: ΔW = lora_B @ lora_A.
  • Scales it by alpha / rank to get a comparable norm.
  • Then maps it to a strength: strength = clamp(global * (mean_norm / layer_norm)), floored at 0.30 and capped at 1.50.

Note the inversion: a layer with a high ΔW norm gets a lower strength, because it's already strongly trained. The mean layer lands exactly on your global_strength. Double blocks (8 of them, in Klein's layout) are analyzed with their image and text streams independently, since a LoRA can train one stream more than the other.

This is the same fusion logic as the rest of the pack: diffusers-format LoRAs (separate to_q/to_k/to_v) get converted to FLUX's fused QKV layout so the attention weights actually reach the model.

Inputs and outputs

The required inputs are exactly three:

  • model - the FLUX.2 Klein model.
  • lora_name - dropdown from models/loras.
  • global_strength - the master knob, default 0.75, range -2.0 to 2.0. The tooltip says it all: "Master strength. Everything else is computed automatically from the LoRA weights."

Outputs are model (wire to your sampler) and analysis_report, a STRING that's genuinely worth looking at once. Drop it into a ShowText node and you'll see rank, alpha, ΔW mean/median/max, and the per-layer img/txt strengths it derived. Set global_strength to 0 and it returns the model untouched with a "Skipped" report - handy for A/B testing without rewiring.

Install

Via ComfyUI Manager, search Comfyui-flux2klein-Lora-loader. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/capitan01R/Comfyui-flux2klein-Lora-loader.git

Restart after. No model downloads, no dependencies beyond numpy (already in ComfyUI). LoRA goes in ComfyUI/models/loras.

Gotchas

The one knob still matters. 0.75 is the author's default and a sane starting point for most Klein LoRAs, but it's a master scale, not a magic number - nudge it up for a weakly-trained style LoRA, down for a strong one. And remember the format reality: the auto-convert handles diffusers naming, but it's built around Klein 9B's block layout, and 4B LoRAs won't map onto a 9B model regardless. If a LoRA still looks weak after the analysis report says it converted fine, the usual suspects apply - wrong base model size, or a LoRA trained against Klein base being applied to the distilled checkpoint without enough strength.

Categoryloaders/FLUX

Inputs (3)

NameTypeDefaultDescription
modelMODEL
lora_nameCOMBO0 options:
global_strengthFLOAT0.75-2–2Master strength. Everything else is computed automatically from the LoRA weights.

Outputs (2)

NameTypeDescription
modelMODEL
analysis_reportSTRING