Nodes/Realtime LoRA Trainer/FLUX Klein 9B Analyzer + Selective Loader V2
ComfyUI Node

FLUX Klein 9B Analyzer + Selective Loader V2

Block-level control for Klein LoRAs

By shootthesound·Created 10 months ago·Updated 2 months ago· 568
FLUX Klein 9B Analyzer + Selective Loader V2
  • model
  • positive
  • negative
  • model
  • positive
  • negative
  • analysis
  • analysis_json
  • weights_output
◄lora_name▾►
◄strength1.00►
◄presetDefault►
◄double_0true►
◄double_0_str1.00►
◄double_1true►
◄double_1_str1.00►
◄double_2true►
◄double_2_str1.00►
◄double_3true►
◄double_3_str1.00►
◄double_4true►
◄double_4_str1.00►
◄double_5true►
◄double_5_str1.00►
◄double_6true►
◄double_6_str1.00►
◄double_7true►
◄double_7_str1.00►
◄single_0true►
◄single_0_str1.00►
◄single_1true►
◄single_1_str1.00►
◄single_2true►
◄single_2_str1.00►
◄single_3true►
◄single_3_str1.00►
◄single_4true►
◄single_4_str1.00►
◄single_5true►
◄single_5_str1.00►
◄single_6true►
◄single_6_str1.00►
◄single_7true►
◄single_7_str1.00►
◄single_8true►
◄single_8_str1.00►
◄single_9true►
◄single_9_str1.00►
◄single_10true►
◄single_10_str1.00►
◄single_11true►
◄single_11_str1.00►
◄single_12true►
◄single_12_str1.00►
◄single_13true►
◄single_13_str1.00►
◄single_14true►
◄single_14_str1.00►
◄single_15true►
◄single_15_str1.00►
◄single_16true►
◄single_16_str1.00►
◄single_17true►
◄single_17_str1.00►
◄single_18true►
◄single_18_str1.00►
◄single_19true►
◄single_19_str1.00►
◄single_20true►
◄single_20_str1.00►
◄single_21true►
◄single_21_str1.00►
◄single_22true►
◄single_22_str1.00►
◄single_23true►
◄single_23_str1.00►
◄other_weightstrue►
◄other_weights_str1.00►
◄lora_path_opt—►
◄schedule_presetCustom►
◄strength_schedule►
◄save_refined_lorafalse►
◄save_path►
◄save_filename►
◄block_weights_string►

What it is

FLUX Klein 9B has been the default local image editor since it shipped in January 2026, and it's earned a real reputation for tolerating LoRA stacking better than its rivals - community reports of three Klein LoRAs run together at full strength without the quality collapse Z-Image shows past two. But Klein has its own well-documented rough edges: anatomy mistakes baked in during the first couple of denoising steps, identity drift on edits, and a warm color shift that shows up even at full precision. This node is the tool for working around those at the LoRA level - instead of one strength slider for a Klein LoRA like SNOFS or a realism stack, you get individual control over all 32 of Klein 9B's transformer blocks (8 "double" blocks handling the joint image/text stream, 24 "single" blocks downstream), plus strength scheduling and a save-to-disk option.

If a Klein LoRA is dragging in more anatomy weirdness or color shift than the base model already has, or a character LoRA is fighting your prompt harder than it should, this is where you go looking for which blocks are responsible.

How it works

The node analyzes your chosen LoRA and scores each of the 32 blocks 0–100% by weight magnitude, then lets you individually disable or reweight any block before patching the result onto your model and conditioning. The V2 nodes in this pack add strength scheduling on top of plain block toggling: instead of a flat multiplier, you can vary the LoRA's influence across the generation with step:strength keyframes - steps as 0–1 fractions of total generation - picked from 40-plus presets or written by hand, which is genuinely useful on a 4-step distilled model like Klein where "early" and "late" cover very few actual steps.

Inputs and outputs that matter

  • model, positive, negative, lora_name - this node routes conditioning through itself, not just model/clip, so scheduling applies correctly.
  • strength - the base multiplier (-10 to 10) before scheduling adjusts it.
  • preset - block-selection presets for common splits.
  • double_0–double_7 and single_0–single_23, each paired with a _str slider, plus other_weights for anything outside the 32 mapped blocks.
  • schedule_preset and strength_schedule (optional) - a named schedule or your own step:strength sequence.
  • save_refined_lora, save_path, save_filename (optional) - bake your block selection into a new, smaller LoRA file.
  • Optional lora_path_opt overrides the dropdown with a direct path.

Outputs: model, positive, negative (patched/pass-through), analysis (readable report), analysis_json.

Installing it

No external backend needed for this node - it works the moment the pack is installed. ComfyUI Manager (search "Realtime LoRA Trainer") or:

cd ComfyUI/custom_nodes
git clone https://github.com/ShootTheSound/comfyUI-Realtime-Lora

Restart ComfyUI.

Common issues

Anatomy problems persist regardless of block selection. This is a known, largely unfixed Klein weakness baked into the first couple of denoising steps rather than something any single LoRA carries - running more inference steps at a slightly higher CFG (around 1.2–1.5 instead of 1.0) helps more than block selection will here. Don't expect this node to fully solve it.

32 blocks feels like overkill for a 9B model. It's a smaller block count than the plain FLUX loader (57) precisely because Klein's architecture is smaller - read the analysis output rather than assuming Klein LoRAs distribute the same way as Flux.1 ones.

4B and 9B LoRAs don't mix. Klein 4B and 9B are not LoRA-compatible with each other - this node is specifically for 9B LoRAs; if your file was trained on Klein Base 4B, it won't load sensibly here regardless of block settings.

Scheduling looks like it does nothing on a 4-step distilled run. With so few total steps, a schedule needs coarse, deliberate keyframes rather than a smooth curve meant for a 20-30 step run - try a simple two-point fade before assuming scheduling isn't working.

Categoryloaders/lora

Inputs (79)

NameTypeDefaultDescription
modelMODEL—
positiveCONDITIONINGPositive conditioning from CLIP encode
negativeCONDITIONINGNegative conditioning from CLIP encode
lora_nameCOMBOLoRA file to load and analyze
strengthFLOAT1.00-10–10Overall LoRA strength (ignored when using schedule)
presetCOMBODefaultQuick preset selection. Individual toggles below override when changed.
double_0BOOLEANtrue—
double_0_strFLOAT1.00-5–5—
double_1BOOLEANtrue—
double_1_strFLOAT1.00-5–5—
double_2BOOLEANtrue—
double_2_strFLOAT1.00-5–5—
double_3BOOLEANtrue—
double_3_strFLOAT1.00-5–5—
double_4BOOLEANtrue—
double_4_strFLOAT1.00-5–5—
double_5BOOLEANtrue—
double_5_strFLOAT1.00-5–5—
double_6BOOLEANtrue—
double_6_strFLOAT1.00-5–5—
double_7BOOLEANtrue—
double_7_strFLOAT1.00-5–5—
single_0BOOLEANtrue—
single_0_strFLOAT1.00-5–5—
single_1BOOLEANtrue—
single_1_strFLOAT1.00-5–5—
single_2BOOLEANtrue—
single_2_strFLOAT1.00-5–5—
single_3BOOLEANtrue—
single_3_strFLOAT1.00-5–5—
single_4BOOLEANtrue—
single_4_strFLOAT1.00-5–5—
single_5BOOLEANtrue—
single_5_strFLOAT1.00-5–5—
single_6BOOLEANtrue—
single_6_strFLOAT1.00-5–5—
single_7BOOLEANtrue—
single_7_strFLOAT1.00-5–5—
single_8BOOLEANtrue—
single_8_strFLOAT1.00-5–5—
single_9BOOLEANtrue—
single_9_strFLOAT1.00-5–5—
single_10BOOLEANtrue—
single_10_strFLOAT1.00-5–5—
single_11BOOLEANtrue—
single_11_strFLOAT1.00-5–5—
single_12BOOLEANtrue—
single_12_strFLOAT1.00-5–5—
single_13BOOLEANtrue—
single_13_strFLOAT1.00-5–5—
single_14BOOLEANtrue—
single_14_strFLOAT1.00-5–5—
single_15BOOLEANtrue—
single_15_strFLOAT1.00-5–5—
single_16BOOLEANtrue—
single_16_strFLOAT1.00-5–5—
single_17BOOLEANtrue—
single_17_strFLOAT1.00-5–5—
single_18BOOLEANtrue—
single_18_strFLOAT1.00-5–5—
single_19BOOLEANtrue—
single_19_strFLOAT1.00-5–5—
single_20BOOLEANtrue—
single_20_strFLOAT1.00-5–5—
single_21BOOLEANtrue—
single_21_strFLOAT1.00-5–5—
single_22BOOLEANtrue—
single_22_strFLOAT1.00-5–5—
single_23BOOLEANtrue—
single_23_strFLOAT1.00-5–5—
other_weightsBOOLEANtrue—
other_weights_strFLOAT1.00-5–5—
lora_path_optoptSTRINGOptional: Override LoRA selection with a path
schedule_presetoptCOMBOCustomSelect a preset schedule (populates the text field below for editing)
strength_scheduleoptSTRINGStrength schedule: 0:.2,.5:.8,1:1.0 (step:strength pairs). Edit freely after selecting preset.
save_refined_loraoptBOOLEANfalseEnable to save the refined LoRA to disk
save_pathoptSTRINGDirectory to save refined LoRA
save_filenameoptSTRINGFilename for saved LoRA (timestamp auto-appended). Leave empty for auto-name.
block_weights_stringoptSTRINGInput/Output block profile string. Positional text syncs with the UI. String input overrides UI values.

Outputs (6)

NameTypeDescription
modelMODELModel with LoRA applied (filtered by enabled blocks).
positiveCONDITIONINGPositive conditioning (with hooks if using schedule).
negativeCONDITIONINGNegative conditioning (with hooks if using schedule).
analysisSTRINGPer-block analysis showing impact scores.
analysis_jsonSTRINGJSON analysis data for UI coloring.
weights_outputSTRINGBlock profile string output for chaining or reuse.