Files
ethanfel-ComfyUI-LoRA-Optim…/tests
EthanfelandClaude Opus 4.8 7f8e5035e9 perf(merge): skip dense+compression SVD for single-LoRA groups
Layers only one LoRA touches have no conflict to sparsify and no second
diff to align, so TIES/DARE/refinement are no-ops on them. Previously,
turning on sparsification or refinement disabled the exact low-rank fast
path for EVERY group — so single-LoRA layers needlessly materialized a
full dense diff and ran a compression SVD (the 99%-of-Pass-2 cost on the
Krea 2 softwatercolor merge, where each layer only one LoRA touches paid
a large GPU SVD).

Take the exact low-rank fast path for single-LoRA groups regardless of
those toggles, emitting the LoRA's native factors directly. Size-safe:
a single LoRA's compress_rank is max(rank, 64) >= its native rank, so
compression never shrank it anyway (only padded rank<64 up to 64) —
bypassing is always equal-or-smaller, and peak VRAM drops too (no dense
tensor is built). Multi-LoRA groups are unchanged.

No version bump.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 01:41:25 +02:00
..