Files
ethanfel-ComfyUI-LoRA-Optim…/docs/wiki
EthanfelandClaude Opus 4.8 785983d13f fix(merge): revert automatic sum_preserve; style preservation is preserve-flag only
A real 3-LoRA merge (characters/concept, no style) oversaturated badly (energy
2.52x vs main's 1.02x): additive stacking is wrong for a balanced multi-LoRA blend.
The analyzer cannot tell 'preserve this style' from 'blend these characters' — both
are orthogonal — so additive must never be auto-selected; it has to be user intent.

- Revert _decide_prefix_mode: orthogonal groups blend by default again
  (weighted_average / SLERP), exactly like main. No auto sum_preserve.
- Make the preserve flag a general overlay in _merge_diffs: blend the non-preserved
  LoRAs with the chosen mode, then add each preserved LoRA's full delta on top
  (works for weighted_average/slerp/ties; still exempt from sparsification + TIES
  sign-election). Skip the exact-linear fast path when the stack has a preserve flag.
- Remove the standalone sum_preserve mode, its exact-linear handling,
  _ORTHO_SUM_HEADROOM, and the sum+ report/legend/strategy-count display.
- Tests: SumPreserveMergeTests -> PrefixModeRoutingTests (asserts additive is never
  auto-selected); add preserve-overlay-on-weighted_average tests. 299 pass.
- Docs (Merge-Algorithms, Tips) + design-doc postmortem updated; algo note reworded.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-22 11:53:36 +02:00
..