Commit Graph
4 Commits
Author SHA1 Message Date
EthanfelandClaude Sonnet 4.6 04442c3ce2 fix: compress LoRAAdapter patches in SaveMergedLoRA when save_rank is set
The fast linear merge path (_build_exact_linear_patch) produces LoRAAdapters
with rank = sum of all input ranks. SaveMergedLoRA was extracting these
weights directly without applying any SVD compression, making save_rank and
patch_compression settings ineffective for weighted_sum/weighted_average merges.

Fix: compress LoRAAdapter patches when current_rank > target_rank (where
target = save_rank when explicit, or fallback_rank in auto mode). Skip
LoCon patches (mid != None) which require special reshape handling.

Also improve auto-mode logging to explain rank growth (n_loras × avg_rank)
and direct users to set save_rank explicitly to control output file size.

Fix test discovery: __init__.py relative import fails when pytest imports it
as a standalone module. Guard with try/except to prevent all tests from
failing during collection/setup. Add pyproject.toml pytest config and
conftest.py to configure test discovery.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 14:17:40 +02: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
EthanfelandClaude Opus 4.6 55983d08bb Rename to ComfyUI-LoRA-Optimizer and remove unused nodes
Remove ZImageLoRAMerger, ZImageLoRAStackApply, ZImageLoRAMergeToSingle,
and ZImageLoRATrueMerge (as a registered node). Only LoRAStack and
LoRAOptimizer remain. ZImageLoRATrueMerge becomes _LoRAMergeBase
(internal base class). Rename file, update all references, rewrite README.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 16:46:09 +01:00
Danrisi 76fa667f38 Initial commit: Z-Image LoRA Merger custom nodes for ComfyUI 2026-01-06 14:29:48 +02:00