Nodes/Realtime LoRA Trainer/LoRA Loader + Analyzer
ComfyUI Node

LoRA Loader + Analyzer

Find out which blocks your LoRA actually uses

By shootthesound·Created 8 months ago·Updated 2 months ago· 538
LoRA Loader + Analyzer
  • model
  • clip
  • model
  • clip
  • analysis
  • analysis_json
  • lora_path
lora_name
strength_model1.00
strength_clip1.00

What it is

This is the diagnostic node that makes this pack's Selective LoRA Loaders actually useful instead of a wall of guesswork. Drop it in as a straight swap for ComfyUI's standard LoRA loader - same model/clip in, same model/clip out - and it also hands back a per-block impact analysis: which parts of the LoRA carry real weight, and which are close to inert. Connect that analysis to any of this pack's Selective Loaders and their block checkboxes light up color-coded by measured impact instead of leaving you to click through dozens of toggles blind.

The pack's own author uses this to real effect: his own testing found Z-Image character identity clustering hard in the late layers (roughly 18–28) with style spread across earlier ones and a miscellaneous "other weights" bucket - the kind of finding you can only get by actually measuring a LoRA rather than assuming where a "typical" LoRA puts its weight. If you're about to spend time in a Selective Loader trying to isolate a face from a style, run this first.

How it works

The node calculates a strength score, 0 to 100%, for each block based on the magnitude of that block's weight deltas in the LoRA file - high-impact blocks are where the LoRA changed the most, which usually correlates with where it "learned" the subject's face, a style signature, or composition habits. It outputs that as both a human-readable text breakdown and a JSON blob purpose-built for the pack's Selective Loaders: blue checkboxes for low impact (0–30%), cyan/green for medium (30–60%), yellow/orange for high (60–90%), red for very high (90–100%).

Inputs and outputs that matter

  • model, clip, lora_name - identical to a stock LoRA loader.
  • strength_model and strength_clip - separate strength dials for the model and CLIP patches, same convention as ComfyUI's built-in loader.

Outputs: model and clip (patched, use it as a drop-in replacement for the standard loader even if you never touch the analysis), analysis (a readable text report), analysis_json (feed this into any Selective LoRA Loader's analysis_json input for the color-coded checkboxes), and lora_path (the resolved file path - connect this to a Selective Loader's lora_path_opt if you want to analyze a LoRA and selectively load it in one pass, since a path override bypasses the loader's own dropdown selection).

Installing it

Works the moment the pack is installed - no external trainer backend needed. ComfyUI Manager (search "Realtime LoRA Trainer") or:

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

Restart ComfyUI.

Common issues

Every block shows roughly the same impact score. Some LoRAs really are spread evenly - usually broad style LoRAs trained at low rank rather than character LoRAs. If nothing stands out, selective block loading won't buy you much for that particular LoRA, and it's not a bug in the analysis.

Analysis and outputs are ignored, and that's fine. The node's analysis/analysis_json/lora_path outputs are entirely optional - if you just want a drop-in replacement for the stock LoRA loader with no analysis overhead downstream, wire only model/clip onward and leave the rest disconnected.

Impact scores don't match intuition for LoKr or LoHa-format LoRAs. The analyzer detects and handles standard LoRA, LoKr, LoHa, and GLoRA formats differently under the hood since they decompose weights differently - the pack surfaces the detected type in the analysis text (e.g. "ZIMAGE (LoKr)"), so check that line before assuming the numbers are wrong. LoKr in particular has become the community default for character LoRAs on newer architectures, so seeing it flagged here is normal, not a red flag.

Categoryloaders/lora

Inputs (5)

NameTypeDefaultDescription
modelMODEL
clipCLIP
lora_nameCOMBOLoRA file to load and analyze
strength_modelFLOAT1.00-10–10LoRA strength for model (UNet/DiT)
strength_clipFLOAT1.00-10–10LoRA strength for CLIP text encoder

Outputs (5)

NameTypeDescription
modelMODELModel with LoRA applied.
clipCLIPCLIP with LoRA applied.
analysisSTRINGPer-block patch analysis. Shows which blocks are affected by this LoRA.
analysis_jsonSTRINGJSON analysis data. Connect to Selective LoRA Loader for impact-colored UI.
lora_pathSTRINGFull path to the loaded LoRA file. Connect to Selective LoRA Loader.