Files
ethanfel-ComfyUI-LoRA-Optim…/docs
EthanfelandClaude Opus 4.8 cdb14d6a01 feat(merge): per-LoRA preserve flag to protect tagged style LoRAs in conflict merges
Adds a 'preserve' toggle to LoRAStack and LoRAStackDynamic (advanced). A LoRA
tagged preserve=True is exempt from the two mechanisms that delete a style in a
conflict merge:
  - sparsification (DARE/DELLA/conflict-aware): its diff is never trimmed/dropped
  - TIES sign-election: instead of being zeroed where it holds the minority sign,
    its full contribution is added on top of the TIES-merged content

Plumbed as a 6th stack-tuple field / dict key through _normalize_stack,
_merge_one_group -> _merge_diffs(preserve_flags=...), and the IS_CHANGED cache
keys + LoRAConflictEditor tuple rebuilds (so toggling it invalidates caches and
survives the editor). LoRAStackDynamic JS migration extended 8->9 widgets/slot
(preserve appended at each slot tail; legacy 7- and 8-slot saves re-padded).

The auto-strength exclusion from the design was descoped (single uniform scale is
baked into the linear path + group-cache replay; the reduction is mild/floor-bounded).

7 new tests (PreserveFlagTests); conflict-editor tuple test updated to 6-tuple; 302 pass.

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