Commit Graph
522 Commits
Author SHA1 Message Date
EthanfelandClaude Opus 4.7 744efb2477 docs: add combinator rerun_mode toggle plan
Small side plan: temporary BOOLEAN input on LoRACombinationGenerator that
routes progress tracking to combo_progress_rerun.json, enabling a full
re-run of the 400-combo collection to backfill per-prefix decisions
once Phase A of the estimator plan lands. To be reverted after use.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-21 13:58:50 +02:00
EthanfelandClaude Opus 4.7 4d1892a2f0 docs: add estimator pre-node implementation plan
Task-by-task TDD plan for the case-based retrieval estimator. Covers
per-prefix decision capture (Phase A), feature extractor + index builder,
LoRAEstimator runtime, and the ComfyUI node surface.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-21 13:51:15 +02:00
EthanfelandClaude Opus 4.7 251e298d27 docs: estimator pre-node design
k-NN retrieval over HF community cache, emits tuner_data for the
existing optimizer replay path. Per-prefix instrumentation lands
first, dataset gets re-collected, estimator ships with both global
and per-prefix retrieval.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-21 13:43:33 +02:00
EthanfelandClaude Opus 4.7 b161b13886 feat: tag community cache uploads with base_model_family
Threads the detected architecture family (zimage, wan, flux, qwen_image,
etc.) into the config payload so the 'dit' arch_preset bucket can be
filtered by sub-family downstream (estimator training, targeted cache
reuse). Existing 400 configs on HF were backfilled with zimage in a
separate dataset commit.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-21 11:08:52 +02:00
EthanfelandClaude Opus 4.6 d6c8bfbf73 fix: deep-convert JSON lists to tuples for cached target_keys
target_key can be a nested tuple like ("key", (dim, start, size)).
JSON round-trips flatten this to ["key", [dim, start, size]].
The shallow tuple() conversion only fixed the outer level, leaving
inner lists unhashable — causing TypeError in single_lora_keys.add().

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-20 12:45:40 +02:00
EthanfelandClaude Opus 4.6 be1847cc37 fix: reduce analysis partial save log from info to debug
Fires on every prefix during analysis, spamming the console.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-20 10:30:27 +02:00
EthanfelandClaude Opus 4.6 a51580f9d9 fix: make combo progress seed-independent and prevent auto-randomization
Root cause: ComfyUI auto-randomizes INT inputs named "seed", generating
a new seed each queue run. Progress was keyed by seed, so each new seed
started from scratch.

- Rename "seed" input to "shuffle_order" to prevent auto-randomization
- Store completed combo hashes in a flat set instead of per-seed keys
  (combo hashes are already order-independent, so progress persists
  regardless of shuffle order)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-19 18:10:14 +02:00
EthanfelandClaude Opus 4.6 5318e48e8c feat: add diagnostic logging to LoRACombinationGenerator
Logs seed, pool size, combo count, completed count, progress file path
on entry, confirms save success/failure, and logs returned combo info.
Improves error message for insufficient LoRAs to show filtered list.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-19 18:04:23 +02:00
Ethanfel 75076b4efe Merge branch 'speed/autotuner-loop-optimizations' into feat/acestep-merge-optimization 2026-04-19 13:01:40 +02:00
EthanfelandClaude Opus 4.6 3e03a048b9 feat: require folder_filter and support multiple comma-separated prefixes
Empty filter no longer allowed — there's no point merging across
incompatible architectures. Users must specify prefixes like
'zit/,zib/' to combine compatible LoRA pools.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-19 12:59:17 +02:00
EthanfelandClaude Opus 4.6 9d90ee728e feat: add folder_filter input to LoRA Combination Generator
Filters the LoRA pool by path prefix (e.g. "zimage/" or "sdxl/")
so users can generate combos only for compatible architectures.
Empty string includes all LoRAs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-19 12:56:07 +02:00
EthanfelandClaude Opus 4.6 663d782d26 fix: add missing log warning when skipping deleted LoRA combos
Design doc requires logging when a LoRA file is missing and a combo
is skipped. Follows existing project convention of logging.warning
with the [LoRA ...] prefix.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-19 12:40:24 +02:00
EthanfelandClaude Opus 4.6 4afbef2fc0 fix: use InterruptProcessingException for graceful stop when combinations exhausted
LoRACombinationGenerator previously raised RuntimeError when all combos
were done, showing a red error in ComfyUI's UI. Now uses ComfyUI's
InterruptProcessingException which sends an "execution_interrupted"
event — clean yellow stop instead of a scary error traceback.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-19 12:37:34 +02:00
EthanfelandClaude Opus 4.6 f3a3cb4a5d fix: replace recursive retry with iterative loop in get_next_combo
The missing-LoRA handling used unbounded recursion via
`return self.get_next_combo(...)` which would hit Python's recursion
limit of 1000 when many LoRAs are deleted. Replaced with an iterative
while-loop that skips deleted-LoRA combos without growing the stack.

Also removed redundant `OUTPUT_NODE = False` (it's the default).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-19 12:33:38 +02:00
EthanfelandClaude Opus 4.6 f76b2d7a84 feat: add ComfyUI node interface to LoRACombinationGenerator
Add INPUT_TYPES, RETURN_TYPES, IS_CHANGED, __init__, and get_next_combo
methods so the class works as a ComfyUI node. Register in
NODE_CLASS_MAPPINGS and NODE_DISPLAY_NAME_MAPPINGS. Add 3 tests for the
node interface (input fields, return types, IS_CHANGED returns NaN).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-19 12:28:33 +02:00
EthanfelandClaude Opus 4.6 9c9c7390d4 fix: use string combo_size and seed_ prefix in LoRACombinationGenerator
combo_size now accepts ComfyUI dropdown strings ("2", "3", "2_and_3")
instead of integers. Progress JSON keys use "seed_42" format instead
of bare "42" for clarity.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-19 12:24:02 +02:00
EthanfelandClaude Opus 4.6 b56d973542 feat: add LoRACombinationGenerator with combo generation and progress tracking
Implements core static methods for generating, shuffling, hashing, and
tracking LoRA combinations (pairs/triples) with deterministic seeding
and JSON-based progress persistence. Includes 11 TDD tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-19 12:21:18 +02:00
EthanfelandClaude Opus 4.6 dd48cc33c8 docs: add LoRA Combination Generator implementation plan
4 tasks: core logic tests, static methods, ComfyUI node interface,
stop mechanism verification. TDD approach throughout.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-19 12:18:08 +02:00
EthanfelandClaude Opus 4.6 014e15aa34 docs: add LoRA Combination Generator design
Node that exhaustively generates all 2/3-way LoRA combinations for
AutoTuner dataset collection. Uses seed-based deterministic shuffle
with lightweight completion tracking.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-19 12:15:59 +02:00
EthanfelandClaude Opus 4.6 abe3433e16 docs: replace exclusive cross-attention claim with v1.5 paper quote
The doc previously stated voice identity enters "exclusively" through
cross-attention, which was an inference not supported by any source.
Replace with the actual quote from the ACE-Step 1.5 paper and clarify
that voice info propagates through self-attention/MLP after injection.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-14 17:19:38 +02:00
EthanfelandClaude Opus 4.6 10bf36ada4 docs: fix node name references in ACE-Step recommendations
Use actual node names (LoRA Stack, LoRA Optimizer, LoRA AutoTuner)
instead of nonexistent "ZImage LoRA Merger node". Broaden recommendations
to cover all ACE-Step LoRA merges, not just vocal + music.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-14 13:14:57 +02:00
EthanfelandClaude Opus 4.6 fe9becfe73 feat: add ACE-Step 1.5 merge optimization for voice preservation
Add dedicated architecture support for ACE-Step music generation model LoRAs
with optimizations informed by the v1.5 hybrid attention architecture — cross-
attention is the primary voice-identity pathway (always global, attending to
timbre+lyric+text conditioning), while self-attention alternates sliding window
(local timbre) and global GQA (long-range structure).

Changes:
- New `acestep_dit` preset: wider orthogonal band (0.30), higher TIES threshold
  (0.35), full magnitude preservation (floor 1.0) — biases toward SLERP over
  TIES to prevent voice signal trimming in cross-attn layers
- Fix `to_out` → `o_proj` normalization bug (was producing `out_proj`)
- Add v1.0 detection and normalization (transformer_blocks, speaker_embedder,
  lyric_encoder mapped to v1.5 canonical form)
- Refine WAN detection to exclude transformer_blocks (prevents v1.0 misdetect)
- Add `acestep_dit` to all architecture_preset UI dropdowns
- 25 new tests (detection, normalization, preset)
- Technical reference doc with architecture analysis and design rationale

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-14 12:59:13 +02:00
EthanfelandClaude Opus 4.6 f70b374b7b docs: update license references from MIT to GPL-3.0
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-14 00:52:41 +02:00
EthanfelandClaude Opus 4.6 6db20a1419 chore: bump version to 1.6.2
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-14 00:46:23 +02:00
EthanfelandClaude Opus 4.6 96312042d1 fix: add SD 1.5 detection and fix SDXL diffusers key normalization
The SDXL normalizer's .replace('.', '_') was mangling LoRA weight
suffixes (.lora_down.weight → _lora_down_weight), breaking prefix
extraction for diffusers-format keys. Added _split_lora_suffix to
preserve suffixes. Also split SD 1.5 from SDXL detection so single-TE
LoRAs normalize to lora_te_ instead of lora_te1_.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-14 00:45:50 +02:00
EthanfelandClaude Opus 4.6 2bc4af3580 perf: cache single-LoRA merge results across Phase 2 candidates
Single-LoRA prefixes produce identical patches regardless of merge config
(forced to weighted_sum, early return at _merge_diffs). Cache results keyed
by (label_prefix, auto_strength) to skip diff recomputation for candidates
2+ sharing the same auto_strength value.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-10 00:52:01 +02:00
EthanfelandClaude Opus 4.6 cc1660710b fix: remove _target_key lambda — compare patch keys directly
Patch dict keys and single_lora_keys both store target_key values
from _group_target_key(). When target_key is a tuple (weight slices),
the lambda extracted k[0] (a string) which never matched the tuple
in the set. Direct comparison handles both string and tuple keys.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-10 00:27:27 +02:00
EthanfelandClaude Opus 4.6 7a2e838c11 refactor: move _target_key lambda outside Phase 2 loop
Avoid redefining the lambda on every iteration — it's a pure function.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-10 00:22:12 +02:00
EthanfelandClaude Opus 4.6 36334bbdbb perf: cache single-LoRA patch scoring across Phase 2 candidates
Single-LoRA patches bypass all merge strategies (early return at line
2868). Score them once on the first candidate and merge as baseline
for subsequent candidates. All composite_score components (norm_cv,
effective_rank, sparsity) are scale-invariant, so auto_strength
differences between candidates don't affect correctness.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-10 00:21:13 +02:00
EthanfelandClaude Opus 4.6 376f304b4c perf: cache LoRA format detection per lora_dict
A LoRA file uses one key format consistently. Caching the winning
format index (0-3) after first detection avoids up to 6 wasted
dict lookups per prefix on subsequent calls. Cache miss on stale
entries is safe — falls through to full cascade.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-10 00:17:28 +02:00
EthanfelandClaude Opus 4.6 19780e20f6 perf: transfer LoRA factors before float conversion in scoring
Moving fp16/bf16 tensors to score_device then converting to fp32
halves the PCIe transfer bandwidth vs converting first. For ~240
LoRAAdapter patches per candidate, saves meaningful transfer time.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-10 00:12:43 +02:00
EthanfelandClaude Opus 4.6 695441f3ff perf: gate psutil memory logging to first/last Phase 2 iteration
Memory diagnostics on every iteration adds overhead without value.
First and last iteration still show whether memory leaks occur.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-10 00:11:37 +02:00
EthanfelandClaude Opus 4.6 2f2848f271 perf: lighten GC in Phase 2 loop — gen-0 only, drop empty_cache
Replace full gc.collect() with gc.collect(0) (youngest generation only,
~10x faster). Remove torch.cuda.empty_cache() — CUDA allocator handles
block reuse, forced sync is pure overhead. Post-loop cleanup at line
9354-9356 still does full gc.collect() + empty_cache().

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-10 00:10:58 +02:00
Ethanfel 023d9cf4f2 fix: skip conflict analysis chatter for single LoRA — clean decision log 2026-04-09 13:29:17 +02:00
Ethanfel c54eeb091d docs: add Community Cache section to README 2026-04-09 13:04:17 +02:00
Ethanfel a5a6f016dc chore: bump version to 1.6.1 2026-04-09 12:43:01 +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 Sonnet 4.6 4921fa3e7e test: verify absent enabled_{i} defaults to enabled (old workflow compatibility)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 11:59:55 +02:00
EthanfelandClaude Sonnet 4.6 e2b6c94467 feat: add enabled_{i} toggle to LoRAStackDynamic — skips disabled slots in build_stack
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 11:57:26 +02:00
EthanfelandClaude Sonnet 4.6 860af94257 docs: add implementation plan for dynamic stacker enable/disable + right-click UX
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 11:54:57 +02:00
EthanfelandClaude Sonnet 4.6 f9bc343468 docs: add design for dynamic stacker enable/disable, remove, reorder
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 11:52:13 +02:00
EthanfelandClaude Sonnet 4.6 8cc78a9be3 fix: reorder settings_source/tuner_data before decision_smoothing in INPUT_TYPES; upload candidates list in community cache
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 11:43:12 +02:00
EthanfelandClaude Sonnet 4.6 4bf9fb279a docs: add Community Cache wiki page
New page covers how it works, privacy model, setup, file structure,
score-based replacement, cache hit log examples, version compatibility,
and troubleshooting. Wired into sidebar and home page.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 15:36:06 +02:00