Commit Graph
550 Commits
Author SHA1 Message Date
ussoewwin 07ef7ec07e feat(krea2): isolated kv_cache reference mode for openpose control LoRA
Replicates the krea2_controlnet_pose.json reference workflow inside this node
(ostris nodes are no longer required):

- _krea2_make_ref_kv_forward: replaces diffusion_model.forward so reference
  latents run in isolated kv_cache mode — one t=0 ref-only pass precomputes
  every block's K/V (refs attend only to each other), reused as extra
  attention keys each denoising step. This matches the ai-toolkit kv_cache
  training convention the openpose control LoRA was trained with
- New helpers: _krea2_patchify, _krea2_ref_pack (RoPE axis-0 index i+1),
  _krea2_ref_attn_kv (K/V capture/inject), _krea2_ref_block_forward,
  _krea2_ref_precompute_kv, _krea2_forward_with_cached_refs,
  _krea2_ref_fingerprint (content-keyed cache)
- New optional node input use_kv_cache (default True); when False the stock
  joint-mode ref path is used instead
- extra_conds ref injection retained: skipped when conditioning already
  carries reference_latents (TextEncodeKrea2OstrisEdit compat), so the VLM
  vision path can still be combined without double injection
- depth / zimage / nunchaku_qwenimage / qwenimage_standard routes unchanged
2026-08-12 16:58:05 +09:00
ussoewwin 042fe16229 fix(krea2): inject openpose control image as native Krea2 reference latent
The openpose control LoRA is a Kontext-style conditioning LoRA (blocks +
txtfusion, no expanded first projection). The previous openpose path only
applied the LoRA patches and never injected the pose image, so generation had
no pose control at all.

- _apply_krea2_openpose_control now VAE-encodes the control image (fit ~1MP,
  snapped /16, ai-toolkit convention) and injects it as a reference latent
  via patched extra_conds / extra_conds_shapes with
  ref_latents_method=index_timestep_zero (native Krea2 ref pathway)
- Injection is skipped when the conditioning already carries
  reference_latents (e.g. TextEncodeKrea2OstrisEdit), so the VLM vision path
  wins and no double injection occurs
- depth / zimage / nunchaku_qwenimage / qwenimage_standard routes unchanged
2026-08-12 16:51:42 +09:00
ussoewwin b7cbf1176d feat: add Krea2 openpose control LoRA support (depth/openpose exclusive routing)
- Add _classify_krea2_control_type() to detect depth vs openpose by first.weight presence
- Add _apply_krea2_openpose_control() for pure block LoRA (no first projection, no control latent)
- Route txtfusion.* keys in _krea2_target_key for layerwise/refiner blocks
- Split krea2 route into depth (unchanged) / openpose (new) exclusive branches
- No changes to zimage/nunchaku/qwenimage_standard routes or loader node
2026-08-12 16:35:09 +09:00
ussoewwin 75f99be161 Fix formatting of license statement in README 2026-07-29 05:11:11 +09:00
ussoewwin 5882889f69 \ chore: delete unused Z-Image-Turbo V2 node and JS\ v2.5.4 2026-07-27 03:47:12 +09:00
ussoewwin 409e24059b docs: add v2.5.4 release notes (EN body and Chinese mirror) 2026-07-27 03:41:37 +09:00
ussoewwin e2aa5e06a3 chore: bump version to 2.5.4 and add changelog entry 2026-07-27 03:40:08 +09:00
ussoewwin b4fd22a6e5 Remove NunchakuZImageTurboLoraStackV2 from docs and node registration 2026-07-27 03:36:34 +09:00
ussoewwin a172bc533f Update README.md 2026-07-24 02:31:21 +09:00
ussoewwin bfde8d508f docs: trim v2.5.3 release notes to adopted changes only 2026-07-23 17:13:51 +09:00
ussoewwin 7ffa94c049 docs: fix v2.5.3 release notes cross-reference numbering 2026-07-23 17:10:33 +09:00
ussoewwin 9c56ec1794 docs: add v2.5.3 release notes (EN body and Chinese mirror) 2026-07-23 17:06:46 +09:00
ussoewwin 74552a8796 chore: bump version to 2.5.3 and add changelog entry v2.5.3 2026-07-23 17:00:02 +09:00
ussoewwin 38b6491ad2 docs: translate PR #52 merge plan to English 2026-07-23 16:53:38 +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
ussoewwin 2e1539030c Merge PR #52: GPU compile acceleration, atomic LoRA cache, bypass-path fix
Adopted from PR #52 (author: Sniper199999, head 601c79d):
- _has_ever_had_loras bypass-path corruption fix (wrappers/qwenimage.py)
- IS_CHANGED model-arg removal: qwenimage.py, qwenimage_v3.py (v2 follows separately)
- LoRA precompiled cache: nunchaku_code/lora_cache.py (atomic writes, mtime invalidation)
- GPU pack/unpack optimization in nunchaku_code/lora_qwen.py
- set_lora_strength_v2 base_rank guard for AWQ modulation slots
- save_precompiled_lora widget handling in dynamic UI JS

Conflict resolutions (kept main v2.5.2):
- __init__.py: keep 2.5.2, Krea2/Diffsynth registrations; TE V2 loader registration rejected
- patches/nunchaku_patch.py: keep rotary compat + suppress_torch_preimport_warning
- nodes/lora/qwenimage_v3.py: synthesized PR functional changes with main's 33ba82e log unification
- .gitignore: restored to v2.5.2 (kept .cursor/, backups/, scripts/ entries)
- nodes/te_offload/ excluded (Adoption 4 rejected: referenced loader classes do not exist)
2026-07-23 14:25:17 +09:00
ussoewwin 930fd82157 Update README.md 2026-07-21 12:47:43 +09:00
ussoewwin f82ccd18d3 docs: point v2.5.2 changelog link to Chinese release notes page 2026-07-21 12:41:59 +09:00
ussoewwin be4378b8e3 chore: remove leftover temp GitHub notes file 2026-07-21 12:34:16 +09:00
ussoewwin b1f03cf9a0 docs: add v2.5.2 release notes with EN switcher body and Chinese mirror 2026-07-21 12:24:19 +09:00
ussoewwin c8087e09ec docs: add Chinese language switchers and update latest release links to v2.5.2 2026-07-21 12:16:35 +09:00
ussoewwin 4d24732f0d release: v2.5.2 suppress cosmetic torch pre-import warning v2.5.2 2026-07-21 12:06:01 +09:00
ussoewwin 3136c83563 docs: explain torch pre-import warning suppression fix 2026-07-21 11:57:37 +09:00
ussoewwin 9e30661bf0 fix: suppress cosmetic Torch already imported warning in prestartup 2026-07-21 11:50:29 +09:00
ussoewwin 0458640134 docs: replace third-party owner wording with component in public docs 2026-07-17 08:20:53 +09:00
ussoewwin dbc417e344 Update README.md 2026-07-12 07:56:47 +09:00
ussoewwin 5537c2e0de docs: verify GPU pack/unpack optimization data flow in PR #52 merge plan
Traced full data flow across Stage 1 (application loop) and Stage 3 (_apply_lora_to_module nunchaku branch). Two-stage optimization is internally consistent — no device mismatch. Previous concern was incorrect and has been replaced with validation results.
2026-07-10 12:42:43 +09:00
ussoewwin 7bc5610e2a docs: reject TE V2 CPU offload (Adoption 4) in PR #52 merge plan
Referenced loader classes do not exist in ComfyUI-nunchaku. CPU offload already available via standard ComfyUI mechanisms. Adoption count revised from 8 to 7 (1 rejected).
2026-07-10 12:12:08 +09:00
ussoewwin 7746a4e996 docs: add PR #52 merge plan with logging unification status
Comprehensive technical analysis of PR #52 adoption items, overwrite items, and additional fixes. Reflects logging unification already completed in commit 33ba82e.
2026-07-10 11:24:56 +09:00
ussoewwin 33ba82e0cc refactor: unify logging across all LoRA nodes
Remove debug print statements from 6 node files. Gate Key Diffusion per-key mapping logs behind NUNCHAKU_LOG_ENABLED env var. Status logs remain always-on.
2026-07-10 11:12:11 +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 14f1e328ce Update README.md 2026-07-08 11:29:14 +09:00
ussoewwin 4d560a5519 docs: Add English release note body for v2.5.1 v2.5.1 2026-07-08 11:02:24 +09:00
ussoewwin 1dfbcc51c3 chore: bump version to 2.5.1 2026-07-08 10:40:22 +09:00
ussoewwin 15ebfa3cb0 docs: add v2.5.1 entry to zhmd/changelogzh.md 2026-07-08 10:38:25 +09:00
ussoewwin f732bec133 \ docs: bump latest release link to v2.5.1 in README\ 2026-07-08 10:35:47 +09:00
ussoewwin 8ace824ea6 docs: remove Diffsynth ControlNet node image from README 2026-07-08 10:32:43 +09:00
ussoewwin eb5cda84b6 docs: add Chinese release notes for v2.5.1 2026-07-08 10:30:10 +09:00
ussoewwin cdd5fddb5a \ docs: add Krea2 depth ControlNet LoRA complete technical guide\ 2026-07-08 10:05:50 +09:00
ussoewwin 8a0add7a38 \ docs: add changelog v2.5.1 Krea2 depth ControlNet LoRA\ 2026-07-08 01:36:05 +09:00
ussoewwin 098f1ca82d docs: restore README changelog links and align changelog technical details 2026-07-08 01:33:32 +09:00
ussoewwin 2ded8ab824 docs: sync Chinese README diffsynth and krea2 usage 2026-07-07 18:46:46 +09:00
ussoewwin 365802a77d docs: add krea2 depth step to diffsynth usage 2026-07-07 18:45:23 +09:00
ussoewwin fd7f463f83 docs: separate diffsynth and krea2 node images 2026-07-07 18:43:08 +09:00
ussoewwin 7c9f144aa4 docs: add krea2 loader entry image 2026-07-07 18:41:53 +09:00
ussoewwin c3fb84837c docs: move diffsynth image in Chinese README 2026-07-07 18:40:13 +09:00
ussoewwin 5fa0a10cb7 docs: move diffsynth image to node list 2026-07-07 18:38:17 +09:00
ussoewwin 9b5557ebfa docs: align diffsynth section with historical state 2026-07-07 18:36:04 +09:00
ussoewwin 1edc155e5b docs: restore README to v2.5.0 state 2026-07-07 18:26:34 +09:00
ussoewwin 6c1eda6028 docs: add krea2 depth note for diffsynth 2026-07-07 18:23:58 +09:00