Commit Graph
6 Commits
Author SHA1 Message Date
EthanfelandClaude Opus 4.6 85f9e03f35 feat: add right-click swap between LoRA Optimizer and AutoTuner
Adds "Swap to LoRA AutoTuner" / "Swap to LoRA Optimizer" to the
right-click context menu. Transfers shared widget values, reconnects
all matching inputs/outputs by name, and removes the old node.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 18:04:08 +01: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
srv1n be7cb96f1e Sync correctness refactor onto upstream dfd3920 2026-03-08 16:02:45 +05:30
EthanfelandClaude Opus 4.6 9cd0907ab6 fix: output_mode toggle and widget clipping on show/hide
- Remove slot name check for AutoTuner output connections (name
  may differ from RETURN_NAMES in some frontends)
- Preserve node width when resizing after widget toggle
- Defer initial hide to after node layout is finalized

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 12:51:51 +01:00
EthanfelandClaude Opus 4.6 7156947a2e feat: hide output_mode/settings_source until tuner_data connected
These widgets are only relevant when AutoTuner and Optimizer are
linked via tuner_data. Hidden by default, shown on connection,
reset to defaults on disconnect.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 12:36:36 +01:00
EthanfelandClaude Opus 4.6 ac7010390c feat: AutoTuner ↔ Optimizer bridge with opposing switches
Single model line workflow: AutoTuner → Optimizer. Only one node
merges at a time — the other is passthrough. A JS bridge syncs
the two switches as opposites when tuner_data is connected.

LoRAOptimizer:
- Add settings_source (manual/from_autotuner) and tuner_data inputs
- New execute_node entry point: from_autotuner = passthrough with
  widget sync via UI data, manual = normal merge
- Subclass safety: LoRAOptimizerSimple and WanVideoLoRAOptimizer
  explicitly set FUNCTION="optimize_merge" to bypass bridge

LoRAAutoTuner:
- Add output_mode (merge/tuning_only): tuning_only skips final
  merge and returns base model unchanged while still outputting
  scored tuner_data for downstream use
- Fix pre-existing bug: two error paths returning 5-element tuples
  instead of required 6

JS (new lora_optimizer_bridge.js):
- onExecuted: sync Optimizer widgets from applied_settings
- Opposing switch sync with recursion guard:
  from_autotuner ↔ merge, manual ↔ tuning_only

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 02:59:33 +01:00