Files
ethanfel-ComfyUI-LoRA-Optim…/js
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
..