Nodes/Corza LoRA Loader (Clean)/Corza Clean Applied LoRAs
ComfyUI Node

Corza Clean Applied LoRAs

Clean up the LoRAs you've already loaded, without rewiring your graph

By CoreyCorza·Created 2 months ago·Updated 2 months ago· 7
Corza Clean Applied LoRAs
  • model
  • model
keep_energy100.0
max_rank0
tame_layers0.00
star_rescalefalse
gate_strength1.00

Maybe you don't want to swap out every Load LoRA node in your workflow. That's the whole pitch of Corza Clean Applied LoRAs: keep ComfyUI's normal LoRA loaders exactly where they are, and drop this node after them to clean up the LoRAs that are already baked into the model. It's the sibling of the pack's Corza LoRA Loader (Clean) - same SVD-based artifact scrubbing, but instead of intercepting a LoRA at load time, it works on whatever patches are already on the MODEL when they reach it.

It exists for the same reason as its sibling: stacked LoRAs and few-step turbo/distilled models (Krea 2 Turbo, Flux turbo, etc.) produce blocky, crunchy, aliased output because the sampler never gets to average out a LoRA's low-energy noise tail, and a few hot layers shove activations off the distilled model's narrow manifold. If you'd rather not rewire a graph full of loaders, this node is the surgical option.

How it works

When a LoRA is applied in ComfyUI, it becomes a set of patches stored on the model object. This node walks those internal patches, finds the standard ComfyUI lora adapters, and refactors each one the same way the loader does: exact SVD of each layer's low-rank update (via a cheap QR reduction on the small factors), keep only the top components up to your energy target, tame the outlier layers, and hand back a cloned model with the cleaned patches.

The safety rules matter here. It deliberately skips patches with DoRA scale, LoCon/Tucker mid weights, reshape metadata, or unknown adapter types - the same conservatism the drop-in loader uses. If it can't safely refactor a patch, it leaves it alone rather than guessing.

Inputs and outputs

One model in, one model out. Everything else is cleanup control, and they're the same knobs as the loader minus the load-time ones:

  • keep_energy (default 100 = off) - per applied patch, keep only the strongest SVD components adding up to this % of the update's energy.
  • tame_layers (default 0 = off) - compress patches whose update is much stronger than the rest of the upstream stack.
  • gate_strength (default 1 = off) - scale the effect on gate layers only (Krea 2's gated attention + SwiGLU gates, the compounding-edits source of stacked-LoRA artifacts). Try 0.5 when stacked LoRAs deform.
  • max_rank caps rank after the energy cut; star_rescale restores a trimmed patch's total strength so you can cut harder without losing effect.

There's no lora_name and no strength_model - this node has nothing to select or weigh. It cleans whatever LoRAs the input model already carries, which makes it a natural fit for model families like Krea 2 where the LoRA is applied on the diffusion model path rather than CLIP.

Where it goes in the graph

Placement is directional. It only sees patches already applied on its input, so:

MODEL -> Load LoRA A -> Corza Clean Applied LoRAs -> Load LoRA B -> sampler

Here LoRA A gets cleaned and LoRA B doesn't - downstream loaders are ignored naturally. Put it before the sampler and after the last loader you want scrubbed.

Install

Same pack, same one-time setup:

cd ComfyUI/custom_nodes
git clone https://github.com/CoreyCorza/comfyui-lora-loader

or search Corza LoRA Loader in ComfyUI Manager. Restart, and it shows up under corza/lora. No extra dependencies and no model downloads - just PyTorch and ComfyUI's own LoRA machinery.

Troubleshooting

  • All defaults = pass-through. With keep_energy 100, tame_layers 0, gate_strength 1, star_rescale off and max_rank 0, the node returns the model untouched. Zero risk in a workflow that isn't asking for it.
  • "No cleanable LoRA patches found" in the console means the input model has nothing it recognizes - double-check your LoRA loaders are upstream of this node, and remember that DoRA/LoCon-style adapters are skipped by design.
  • Cleaning weakens the result - turn on star_rescale to keep the trimmed patches' strength. It only does anything when keep_energy or max_rank actually trims something.

If you'd rather not think about placement at all, the drop-in loader from the same pack is the one that replaces your Load LoRA nodes wholesale. This node is for the graphs you already love and don't want to touch.

Categorycorza/lora

Inputs (6)

NameTypeDefaultDescription
modelMODEL
keep_energyFLOAT100.050–100Per applied LoRA patch, keep only the strongest SVD components adding up to this % of the update's energy. 100 = off.
max_rankINT00–1024Hard cap on each applied LoRA patch's rank after the energy cut. 0 = off.
tame_layersFLOAT0.000–1Compress applied LoRA patches whose update is much stronger than the rest of the upstream LoRA stack. 0 = off, 1 = fully clamped.
star_rescaleBOOLEANfalseSTAR rescale after truncation. Only does something when keep_energy trims a patch or max_rank caps it.
gate_strengthFLOAT1.000–1How much of the applied LoRA patches' effect reaches 'gate' layers only (Krea 2 gated-attention + SwiGLU gates, etc.). Gates are multiplicative sigmoid controls whose LoRA edits have outsized, compounding effect — a big source of artifacts and of stacked LoRAs fighting. 1 = full effect (default), 0 = strip the LoRA from gates (they stay at base). Try 0.5 if stacked LoRAs deform.

Outputs (1)

NameTypeDescription
modelMODEL