Nodes/ComfyUI-YogurtNodes/LoRA Compress (Yogurt Nodes)
ComfyUI Node

LoRA Compress (Yogurt Nodes)

Compress LoRA rank with SVD for standard .lora_down/.lora_up pairs. Optionally absorb alpha/rank first to preserve the actual LoRA effect before compression.

By yogurt7771·Created 2 years ago·Updated 2 months ago· 0
LoRA Compress (Yogurt Nodes)
  • lora
  • compressed_lora
  • compressed_layers_count
  • report
target_rank-1
energy_keep_ratio0.980
min_rank1
key_pattern.*
update_alphatrue
absorb_alphatrue
CategoryYogurtNodes/Models

Inputs (7)

NameTypeDefaultDescription
loraLORALoRA to compress.
target_rankINT-1-1–4096Target rank. Use -1 to auto-pick by energy_keep_ratio.
energy_keep_ratioFLOAT0.9800–1Only used when target_rank=-1. Keeps this fraction of SVD energy.
min_rankINT11–4096Minimum rank when auto-selecting.
key_patternSTRING.*Regex filter for down-key names.
update_alphaBOOLEANtrueRewrite alpha after compression so saved LoRA keeps the expected scale.
absorb_alphaBOOLEANtrueWhen true, reconstruct full LoRA effect using alpha/rank before SVD compression.

Outputs (3)

NameTypeDescription
compressed_loraLORA
compressed_layers_countINT
reportSTRING