ComfyUI Node
PM LoRA Stack Decompose
Decomposes LoRA stack into tensor components for merging. Extracts (up, down, alpha) tuples from each LoRA layer and handles rank mismatches using SVD-based decomposition methods. Decomposition Methods: - none: Requires all LoRAs to have matching ranks (fastest, fails if ranks differ) - rSVD: Randomized SVD for rank reconciliation (fast, recommended for most cases) - energy_rSVD: Energy-based randomized SVD (best for DiT/large LoRAs) - SVD: Full SVD decomposition (slow but optimal) Features hash-based caching to skip recomputation when inputs haven't changed.
PM LoRA Stack Decompose
- key_dicts
- LoRATensors
◄decomposition_methodrSVD►
◄svd_rank-1►
◄device▾►
CategoryLoRA PowerMerge
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| key_dicts | LoRAStack | — | |
| decomposition_method | COMBO | rSVD | Method used to reconcile LoRA ranks when they differ. 'none' will raise an error if ranks do not match. '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). |
| svd_rank | INT | -1-1–128 | Target LoRA rank after decomposition. -1 keeps the rank of the first LoRA. Lower values reduce model size and strength. |
| device | COMBO | Decomposition device. Note: All decomposition uses float32 internally for numerical stability, then converts back to the original dtype. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LoRATensors | LoRATensors | — |