28 Commits
Author SHA1 Message Date
Ethanfel 5bc297010c fix: harden H3 LoRA merge and export correctness 2026-09-06 12:04:06 +02:00
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
EthanfelandClaude Fable 5 9c466b83c6 fix(stacker): restore LoRA names from pre-enabled-toggle workflows
The litegraph workflow format restores widget values positionally. The
enabled_{i} toggle (e2b6c94) was added as the FIRST widget of each slot,
so workflows saved before it have 7 values/slot instead of 8. Without
migration the positional restore shifted every per-slot value by one: the
LoRA path landed in the enabled toggle and each lora_name combo received
"None", silently wiping the stack on load (the API/prompt format is
name-keyed so it stayed correct — only the UI restore broke).

Add migrateWidgetsValues() and override node.configure to re-insert a
default enabled=true at each slot head before litegraph applies the saved
array. Detects layout by slot-region divisibility (7/slot legacy vs
8/slot current), is idempotent, and no-ops on unrecognized lengths.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 10:44:18 +02:00
Ethanfel bc404aa2fc feat: remove gray-out effect — enabled toggle is sufficient visual indicator 2026-04-09 12:38:29 +02:00
Ethanfel 55c24d784f fix: replace w.draw gray-out with onDrawForeground overlay — draw override hid widgets instead of graying them 2026-04-09 12:34:20 +02:00
Ethanfel 66a52dbd6c fix: explicit setDirty in Remove when count=1 — don't rely on enabled setter side-effect 2026-04-09 12:23:05 +02:00
EthanfelandClaude Sonnet 4.6 25588707a5 fix: convert graph_mouse to node-local Y in getExtraMenuOptions for correct slot detection
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 12:13:59 +02:00
Ethanfel f80abf7a65 fix: remove redundant updateVisibility/setDirty in Remove callback — countWidget setter already triggers them 2026-04-09 12:08:06 +02:00
EthanfelandClaude Sonnet 4.6 c46ce74e4c feat: add right-click remove and move-up to LoRAStackDynamic
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 12:05:23 +02:00
EthanfelandClaude Sonnet 4.6 be87ab020f fix: setSlotGrayed idempotency guard, restore cleanup, bound gray loop to visible slots
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 12:03:37 +02:00
Ethanfel b244c62fb5 feat: gray out disabled LoRA slots in LoRAStackDynamic 2026-04-09 12:01:02 +02:00
EthanfelandClaude Opus 4.6 ce0a756a86 fix: show LoRA filename instead of full path in stack nodes
Override _displayValue getter on combo widgets to strip directory
paths, showing only the filename for readability.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-26 12:13:44 +01:00
EthanfelandClaude Opus 4.6 5a19e3f502 refactor: rename strength_mode to settings_visibility in LoRAStackDynamic
The widget now controls visibility of multiple advanced settings (conflict
mode, key filter) beyond just strength sliders, so the name better reflects
its purpose.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 15:56:34 +01:00
EthanfelandClaude Opus 4.6 38339e390a feat: move key_filter to per-LoRA setting with simple/advanced visibility
Migrate key_filter from a stack-wide setting on LoRAStackDynamic to a
per-LoRA per-slot control. Users can now filter keys independently for
each LoRA (e.g. "only take unique VACE keys from LoRA #2") without
chaining multiple stacker nodes.

- LoRAStack: add key_filter dropdown (all/shared_only/unique_only)
- LoRAStackDynamic: replace node-level key_filter with per-slot
  key_filter_{i}; hide conflict_mode and key_filter in simple mode
- _normalize_stack: propagate key_filter from both tuple and dict formats
- _compute_cache_key: include per-entry key_filter, remove sentinel logic
- _merge_one_prefix: filter per-LoRA in both low-rank and full-rank paths
  using raw n_loras from Pass 1
- _build_report: show key_filter per-LoRA instead of globally
- Add LoRAOptimizerSimple with sensible defaults; rename existing
  optimizer to "LoRA Optimizer (Advanced)"

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 14:25:49 +01:00
EthanfelandClaude Opus 4.6 da924b9f82 fix: copy filename stem (not full path) when syncing dropdown to text
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 20:30:04 +01:00
EthanfelandClaude Opus 4.6 fb8173ad7b feat: sync LoRA values when switching input_mode
Switching dropdown->text copies COMBO values to text fields.
Switching text->dropdown matches text values against COMBO options
by exact path, filename stem, or path suffix.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 20:23:38 +01:00
EthanfelandClaude Opus 4.6 433364493f fix: rename mode to strength_mode, restore base_model_filter
Rename "mode" to "strength_mode" to avoid confusion with "input_mode".
Restore base_model_filter for dropdown mode (hidden in text mode).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 20:12:56 +01:00
EthanfelandClaude Opus 4.6 3e87562cd8 feat: add input_mode toggle — dropdown (COMBO) or text (STRING)
New "input_mode" widget switches between dropdown and text modes:
- "dropdown": COMBO dropdowns to browse and pick LoRAs (original behavior)
- "text": STRING text inputs for typing short names or connecting text nodes

Both modes share the same strength/conflict_mode controls. Text mode
resolves short names (filename without path/extension) to full paths
via _resolve_lora_name. JS toggles lora_name_N vs lora_name_text_N
visibility based on input_mode.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 20:06:04 +01:00
EthanfelandClaude Opus 4.6 d0cc763713 feat: change lora_name slots to STRING inputs for text node connections
Replace COMBO dropdowns with STRING text inputs so users can type
short LoRA names (e.g. "Milena_20260216180133") or connect text nodes
directly. Names are resolved to full paths via _resolve_lora_name.
Remove base_model_filter (no longer applicable without COMBO widgets).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 19:57:47 +01:00
EthanfelandClaude Opus 4.6 6a60059cf0 refactor: simplify lora_text to plain text input with name resolution
Remove the autocomplete JS class (was ~155 lines). Instead, resolve
short LoRA names server-side: typing "Milena_20260216180133" matches
against installed LoRAs by filename stem, so it resolves to e.g.
"ZImageTurbo/character/Milena_20260216180133.safetensors". No Lora
Manager dependency needed — just plain text input with smart matching.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 19:34:42 +01:00
EthanfelandClaude Opus 4.6 3e1eb45065 feat: add lora_text input with autocomplete to LoRAStackDynamic
Add a multiline text widget where users can type LoRA paths directly
(one per line) with optional strength values. Supports three formats:
path.safetensors (strength 1.0), path:0.8 (both), path:0.8:0.5
(model:clip). When ComfyUI-Lora-Manager is installed, a lightweight
autocomplete dropdown suggests matches via its API. Works without
Lora Manager too (no autocomplete, user types exact paths).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 19:17:44 +01:00
EthanfelandClaude Opus 4.6 0363d23732 fix: cap retry attempts in base model filter init
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 18:52:36 +01:00
EthanfelandClaude Opus 4.6 20c72fab5c fix: base model filter — path matching, pagination, data safety
- Fix absolute→relative path matching (endsWith against fullLoraList)
- Fix page_size cap (paginate through all pages, build local map)
- Add explicit base_model_filter param to build_stack (no kwargs leak)
- Add retry when widget options not yet populated
- Preserve selected LoRA value when filter changes (no silent reset)
- Handle workflow restore (apply filter after interceptor setup)
- Extract interceptWidgetValue helper, add configurable:true

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 18:48:53 +01:00
EthanfelandClaude Opus 4.6 58a2ec07db feat: add base model filter to LoRAStackDynamic
Adds a dropdown that filters LoRA dropdowns by base model type (SDXL,
Flux, Wan, etc.) using ComfyUI-Lora-Manager's API. If Lora Manager is
not installed, the filter widget is automatically hidden and dropdowns
show the full unfiltered list.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 18:43:40 +01:00
EthanfelandClaude Opus 4.6 2cad48fda6 feat: add JS extension stub for LoRAConflictEditor
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 15:09:22 +01:00
EthanfelandClaude Opus 4.6 f48898f6ca feat: add per-LoRA conflict_mode masking (all/low_conflict/high_conflict)
Allow users to control how each LoRA behaves in contested weight regions.
'low_conflict' applies only where the LoRA agrees with the majority sign,
'high_conflict' applies only where it disagrees. Defaults to 'all' (no
filtering) with zero overhead when unused.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 09:17:52 +01:00
EthanfelandClaude Opus 4.6 77fcabb1f7 fix: dynamic stacker widget hiding (add widget.hidden, canvas dirty, timing)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 23:20:22 +01:00
EthanfelandClaude Opus 4.6 e9304617f4 feat: interference-aware auto-strength, save to loras folder, dynamic stacker JS
- Auto-strength now uses pairwise cosine similarity for exact vector-sum
  energy normalization instead of assuming orthogonal LoRAs
- Save Merged LoRA defaults to ComfyUI loras folder; supports absolute paths
- Add JS extension for LoRA Stack (Dynamic) widget show/hide
- Fix LTX architecture detection for middle_block/mid_block keys
- Update banner SVG with new feature tags

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