ComfyUI Node

PM Resize LoRA

Resizes a LoRA to a different rank using tensor decomposition. This node reduces or increases the rank of all layers in a LoRA model using SVD-based methods. Lower ranks reduce memory usage and may reduce strength, while maintaining semantic meaning. Decomposition Methods: - SVD: Full singular value decomposition (slow but optimal) - rSVD: Randomized SVD (fast, recommended for most cases) - energy_rSVD: Energy-based randomized SVD (best for DiT/large LoRAs) The resizing uses asymmetric singular value distribution (all S values in up matrix) which differs from the symmetric distribution used in lora_decompose.

By larsupb·Created 2 years ago·Updated 3 days ago· 75
PM Resize LoRA
  • lora
  • LoRABundle
decomposition_methodrSVD
new_rank16
device
dtype
CategoryLoRA PowerMerge

Inputs (5)

NameTypeDefaultDescription
loraLoRABundle
decomposition_methodCOMBOrSVDMethod used to reconcile LoRA ranks when they differ. 'SVD' uses full singular value decomposition (slow but optimal). 'rSVD' uses randomized SVD (much faster, near-optimal). 'energy_rSVD' first prunes low-energy LoRA components and then applies randomized SVD for fast, stable rank reduction (recommended for DiT and large LoRAs).
new_rankINT161–128Target LoRA rank after decomposition. Lower values reduce model size and strength.
deviceCOMBO2 options: cuda, cpu
dtypeCOMBO3 options: float32, float16, bfloat16

Outputs (1)

NameTypeDescription
LoRABundleLoRABundle