Diffusers LoRA Stat Viewer
Peek inside a LoRA before you slice it up
- lora
- lora_info
DiffusersLoraStatViewer is the reconnaissance node of the pack. Feed it a loaded LoRA and it dumps everything worth knowing about the file's structure: how many keys it has, what layer types appear, the first ten key names, and - the part you actually came for - the exact transformer block indices present in the file. Its stated purpose is dead simple: help you write the layer_pattern and layer_indices for DiffusersLoraLayersOperation without guessing.
Because here's the thing about the layers-operation node: it matches a regex against key names, and if your regex doesn't fit the file, you get "Modified 0 parameters" and no hint why. This node is the hint. Run it once, read the actual key names off the output, and write the pattern to match reality instead of the default.
Input and output
One input: lora, the LORA output of DiffusersLoadLoraOnly. One output: lora_info, a plain STRING. There's a catch hiding in that type - it's text, not a tensor, so you can't just leave it dangling and expect to see anything. Wire it into a text display node (ComfyUI's Show Text / preview text) to read it in the UI.
The report is honest about its own size: it starts with the summary - total key count, layer types grouped and counted, the first ten keys for pattern-building, and the transformer block indices if any - and then it helpfully (or unhelpfully, depending on your LoRA's size) appends the entire state dict key list. On a big LoRA that string gets long, but it scrolls.
The workflow it enables
- Load with DiffusersLoadLoraOnly.
- Inspect with this node - note which layer type strings and block numbers show up.
- Write
layer_patternandlayer_indicesin DiffusersLoraLayersOperation that match what you saw. - Apply with DiffusersMergeLoraToPipeline, or save the edit with DiffusersSaveLora.
It's especially useful for LongCat and GLM-era LoRAs, where the "block" concept and layer naming come straight from the diffusers/transformers architecture and aren't as standardized as the old SDXL lora_unet_* names people learned to recognize on sight.
Install
ComfyUI Manager → "Comfyui-DiffusersUtils", or:
cd ComfyUI/custom_nodes
git clone https://github.com/lrzjason/Comfyui-DiffusersUtils
Restart ComfyUI. LoRA nodes need no extra deps; the README's requirements.txt step doesn't apply (no such file ships in the repo).
One note: this is a passive diagnostic - it changes nothing. If you were hoping for a visualizer, this isn't it; it's a text dump with a reasonable summary up top. But for the one job it does - telling you what's actually inside a LoRA so you can cut on the real lines - it's exactly what you need.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| lora | LORA | The loaded LoRA to analyze. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| lora_info | STRING | — |