Commit Graph
6 Commits
Author SHA1 Message Date
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
EthanfelandClaude Opus 4.8 044f680ef7 fix(merge): use sum_preserve for orthogonal groups in ALL strategy sets
Real run showed the first cut didn't fix it by default: the applied config was
the 'full' strategy (SLERP, energy 1.22x), while the style-preserving sum_preserve
config (no_slerp/basic, energy 1.91x) ranked LOWER and wasn't applied. Cause: the
Phase-2 scorer (_score_merge_result) is effective_rank*0.4 + (1-norm_cv)*0.3 +
sparsity_fit*0.3 — no magnitude/energy term, and (1-norm_cv) rewards uniform norms,
which is exactly SLERP's magnitude-flattening. So the scorer structurally prefers
the style-flattening merge over the style-preserving one.

SLERP is strictly worse than sum_preserve for orthogonal groups anyway (it rotates
two independent directions into a 45-degree blend that loses both, vs keeping each
in its own subspace), so orthogonal non-opposing groups now use sum_preserve in ALL
strategy sets — the AutoTuner's top config preserves the style by default, no manual
selection. SLERP is retained for its real sweet spot: non-orthogonal, similar-
direction (cos ~0.25-0.5) low-conflict groups in the full set.

Tests: orthogonal/full -> sum_preserve; non-orthogonal-aligned/full -> slerp;
non-orthogonal-aligned/no_slerp -> weighted_average. 304 pass. Docs + algo note updated.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-22 11:27:47 +02:00
EthanfelandClaude Opus 4.8 54fb127f37 docs+chore: document sum_preserve + preserve flag; bump algo 1.11.0, registry 1.8.0
- Merge-Algorithms: new Sum-Preserve section + overview row; weighted_average
  caveat (the /Σw convex-fraction trap) and orthogonal->sum_preserve routing note
- Nodes: preserve toggle on LoRA Stack + LoRA Stack (Dynamic)
- Tips: new 'my style LoRA disappears' troubleshooting entry
- AUTOTUNER_ALGO_VERSION 1.10.2 -> 1.11.0 (orthogonal candidate merges/scores
  change), invalidating stale cached/community rankings
- registry version 1.7.5 -> 1.8.0

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-22 11:08:20 +02:00
EthanfelandClaude Opus 4.8 487385cf60 docs: sync README + wiki to v1.7 (new nodes, params, architectures)
Bring the documentation up to date with the 1.7.0 / algo 1.10.2 state:
- README: document Conflict Editor, Merge Formula, Metadata Reader, Extract
  from Model, Combination Generator; fill param gaps (clip_strength_multiplier,
  dare_dampening, scoring_svd/device/formula, memory_mode, record_dataset,
  output_strength=-1 auto); clarify HunyuanVideo is dit-preset-only (not auto-detected).
- Wiki: add 7 missing nodes to Nodes.md; fix stale option lists (scoring_svd 4
  modes, memory_mode auto_ignore_strength, community_cache upload_only); add
  acestep_dit + Ideogram 4 to architecture tables; fix Home arch count (8->9);
  replace obsolete quality-level/profile names (enhanced+/maximum -> refine+/full,
  classic/v1.2 -> basic/full strategy sets).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 15:19:02 +02:00
EthanfelandClaude Opus 4.6 7959ce81fd merge: integrate PR #1 correctness refactor into test branch
Merges srv1n's correctness refactor (PR #1) with conflict resolution
to preserve our recent setting renames and fixes while incorporating
their core improvements:

- Target-key grouping: analysis/merge operates on resolved model weights
  instead of raw LoRA prefixes, fixing trainer-specific aliasing bugs
- Exact low-rank linear patches: lossless linear merges for weighted_sum
  and weighted_average when no nonlinear ops are needed
- Excess conflict metric: sign disagreement beyond statistical expectation
  (cosine-sim aware), replacing raw conflict ratio in decisions
- Subspace overlap: measures how much LoRA weight perturbations align
- Block smoothing: reduces noisy per-prefix mode flips
- Activation-aware calibration scoring for Phase 2 quality evaluation
- ACE-Step architecture support
- Soft LoKr/LoHa imports for graceful degradation
- RS-LoRA compensation re-enabled with safe heuristic
- 519-line test suite (19 tests, all passing)

Conflict resolution kept our:
- Setting renames (merge_refinement, patch_compression, strategy_set)
- Qwen-Image detection fix
- LoRACompatibilityAnalyzer node
- Conflict-mode masking in _apply_conflict_modes (PR's approach)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 14:19:34 +01:00
EthanfelandClaude Opus 4.6 b47736e1cf docs: add wiki pages and bump version to 1.2.2
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 01:39:14 +01:00