18 Commits
Author SHA1 Message Date
ussoewwin cd3ff69a14 fix(cache): read precompiled cache as bytes, not mmap (Windows page error)
load_file() is mmap-based; a cache file with a readable header but damaged
data region crashes the whole process with a Windows fatal 'page error'
(uncatchable). Read the file as plain bytes and parse with safetensors.torch.load
so the same damage surfaces as OSError -> existing except returns {} -> caller
falls back to re-fuse. Verified: broken cache returns empty dict (no crash),
good cache still loads fully.
2026-08-26 11:40:30 +09:00
ussoewwin 80582bb944 feat: disable nunchaku nodes on AMD/ROCm (no nunchaku) and keep Krea2/ControlNet available
Mirrors the AMD compatibility approach from ComfyUI-NunchakuFluxLoraStacker
(PR #6 + follow-up): probe nunchaku availability, gate registration of all
nunchaku-dependent nodes (QwenImage/Z-ImageTurbo LoRA), and guard runtime
nunchaku imports so they raise a clear RuntimeError instead of ImportError.
The nunchaku-independent Krea2 ControlNet LoRA loader and the ControlNet node
stay registered on every platform.
2026-08-13 15:48:30 +09:00
ussoewwin b683f8a2bd fix(lora): restore first-LoRA state-dict cache and fix v2 IS_CHANGED
Post-merge additional fixes for PR #52 (per md/PR52_MERGE_PLAN.md):

- compose_loras_v2: restore _cached_first_lora_state_dict so the first
  LoRA state dict loaded during section-3 debug inspection is reused in
  the section-4 main loop. Without this the first LoRA is read from disk
  twice whenever the precompiled cache is disabled (default).
- qwenimage_v2.py IS_CHANGED: drop the `model` arg (ComfyUI never passes
  MODEL inputs to IS_CHANGED; the TypeError -> NaN path forced re-compose
  every run) and remove str(model) from the hash (object repr changes
  every run, which also forced constant re-execution).
2026-07-23 14:25:17 +09:00
Shubham Kini 601c79dc91 feat(lora): add GPU compilation speedups and V2 TE CPU offload loaders 2026-07-10 06:29:59 +05:30
ussoewwin 5526b8cac3 fix(lora): restore v2.2.7 duplicate file I/O elimination
Restores the _cached_first_lora_state_dict optimization that was

unintentionally lost during the AWQ modulation layer monkey patch

commit (b618d6f). The cache variable was dropped during the

sectional restructuring of compose_loras_v2().

This eliminates duplicate file I/O for the first LoRA in single-LoRA

workflows, restoring ~40-50% loading time reduction.
2026-05-17 06:53:41 +09:00
ussoewwin 75105eba1c Key Diffusion implementation: Add key analysis logging to QI LoRA nodes 2026-05-17 05:27:06 +09:00
avan 7375cf98cb feat(lora_qwen): improve format detection and add safety skip logs
- Update _detect_lora_format to support LoRA keys with extra tags like .default.weight.
  This ensures compatibility with LoRAs using naming conventions such as:
  transformer_blocks.0.attn.add_k_proj.lora_A.default.weight
- Add detailed warning logs to identify which LoRA files had modulation layers (img_mod/txt_mod) skipped for Nunchaku safety.
2026-05-17 05:26:58 +09:00
ussoewwin 3497713d52 Fix: Add Z-Image-Turbo (NextDiT) module resolution fallback paths
- Add fallback mappings for NextDiT module naming conventions:
  - layers.N.attention.to_qkv -> layers.N.attention.qkv
  - layers.N.attention.to_out.0 -> layers.N.attention.out
  - layers.N.feed_forward.net.0.proj -> layers.N.feed_forward.w13/w1
  - layers.N.feed_forward.net.2 -> layers.N.feed_forward.w2
- Change module resolution failure log level from debug to warning
- Fixes issue where 120 out of 150 LoRA keys were skipped for Z-Image-Turbo models
- Issue was exposed by qwen v2 AWQ fix's stricter module None checks
2026-05-17 05:26:49 +09:00
ussoewwin dd5969165c Fix V2 node isolation and zimageturbo_v4 compatibility: Use V2-specific wrapper, add compose_loras_v2_v2 function, fix apply_awq_mod handling, add comfy import 2026-05-17 05:26:49 +09:00
ussoewwin c837716807 Implement AWQ modulation layer LoRA fix with Runtime Monkey Patch 2026-05-17 05:26:45 +09:00
ussoewwin c7d8d0c8e0 feat: add AWQ enable switch to V2 node 2026-05-17 05:26:43 +09:00
ussoewwin 614c795f22 Fix Issue #44: Prevent freeze on unsupported LoRA and optimize loading performance 2026-05-17 05:26:07 +09:00
ussoewwin d0cb5e3cac Add optimization reports and update code files 2026-05-17 05:25:12 +09:00
ussoewwin fb19f541f1 Fix: Improve module resolution for attention and feed_forward layers - Enhanced _get_module_by_name to properly handle hasattr checks and indexable modules - Added NextDiT-specific key mappings for Z-Image-Turbo official loader - Fixed module lookup to correctly find attention.qkv, attention.out, and feed_forward modules - This ensures LoRA weights are applied to all target layers, not just adaLN_modulation 2026-05-17 05:24:57 +09:00
ussoewwin ad2475c13b Implement v2.2.3 features: detailed LoRA format detection logs and Qwen V3 toggle UI JS 2026-05-17 05:24:56 +09:00
ussoewwin f2f98a95e9 Match v2.2.4 AWQ modulation behavior: skip logs, forward-path LoRA for AWQW4A16Linear, and reset support 2026-05-17 05:24:55 +09:00
ussoewwin c01edb267f Add v2.2.4 features: AWQ modulation layer detection/skip logic and NextDiT forward signature support 2026-05-17 05:24:55 +09:00
ussoewwin 3bd06a67c3 Restore all deleted files: programs, documentation, and add v2.2.4 changelog 2026-05-17 05:24:50 +09:00