LoRA Normalize Alpha
Bake a LoRA's Alpha Into Its Weights (and Drop the Alpha Tensors)
- output_path
Most LoRAs ship with per-layer alpha equal to the rank, so the loader's alpha / rank scale works out to 1.0 and you never think about it. But a decent chunk of the catalog - especially SDXL-era training, where the old advice was alpha at half rank - stores a different number per layer. That's where this node comes in. LoRA Normalize Alpha reads each layer's alpha, multiplies alpha / rank into the up matrix, and saves a new LoRA with the alpha tensors gone. Same effective strength, but the file no longer depends on a loader doing the scaling for you.
Why bother? Because any downstream tool that ignores per-layer alpha - a merger, a resizer, a format converter, a script that assumes scale 1.0 - will quietly mis-scale a LoRA that has alpha ≠ rank. That's how you end up with a "merged" LoRA that's twice as strong as it should be and no idea why. Normalize first and the file is self-describing: whatever handles it next sees plain weights. It's a genuinely useful cleanup step before you merge a LoRA into a checkpoint or feed it to the pack's own resizers.
How it works. A LoRA layer is down @ up, scaled by alpha / rank at load time. The node streams through the file layer by layer (memory-efficient safetensors reader, so no 2GB-in-RAM blowups), computes scale = alpha / rank for each, multiplies the up tensor by it in fp32 when scale != 1.0, and writes out a fresh safetensors with a metadata note that it was normalized. Only the up factors change; down tensors and everything else pass through untouched.
The inputs that matter - there are exactly two, both from info_schema:
lora_name- a dropdown of the LoRAs in yourComfyUI/models/lorasfolder. Pick the one to clean up.output_filename- the output name without extension (defaultnormalized_lora). It lands asnormalized_lora.safetensorsback in your loras folder, so the original is never overwritten.
The single output, output_path, just hands you the path to the new file. It's an output node - wire the path into something, or ignore it entirely and grab the file from your loras folder.
Where people get burned: this node errors with "Input LoRA contains no alpha tensors" on LoRAs that don't store alpha per layer (common on newer formats) - that's expected, not a bug, there's just nothing to normalize. It also refuses to touch low-bit/quantized factors, and if your LoRA's alpha already equals rank, the numeric result is identical to the input; you're only stripping tensors. Fine as hygiene, pointless otherwise.
Install is the usual two routes. ComfyUI Manager → search "Model Utility Toolkit", or:
cd ComfyUI/custom_nodes
git clone https://github.com/silveroxides/ComfyUI-ModelUtils
then restart ComfyUI. The pack's requirements.txt pulls a few extras - unifiedefficientloader, PyAV, mutagen - that Manager handles for you. One real gotcha: the pack uses ComfyUI's newer extension API, so on an outdated ComfyUI the nodes simply won't register. Keep ComfyUI current.
Worth knowing who wrote it: silveroxides is the same handle that publishes Chroma GGUF quants on Hugging Face, and this pack reads exactly like a quantizer's scratch kit - model surgery tools for people who live in safetensors internals. For a niche utility node, that's about as good a pedigree as you get.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| lora_name | COMBO | LoRA whose per-layer alpha scaling will be materialized. | |
| output_filename | STRING | normalized_lora | Output filename without extension, written under ComfyUI's LoRA directory. |
| reference_model | COMBO | None | Optional diffusion model used to normalize flattened LoRA layer names to its exact model paths. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| output_path | * | — |