15 Commits
Author SHA1 Message Date
ussoewwin f050a6bd70 fix(krea2): explicit error when non-Krea2 controlnet file selected for openpose
Krea2ControlNetLoraLoader with an SDXL LLLite/ControlNet file (e.g.
kohya_controllllite_xl_openpose_anime_v2.safetensors) produced a generic
'No block LoRA patches matched' RuntimeError because the file has no
*.lora_A/*.lora_B pairs at all. Add a fast sanity check in the openpose
route that raises an actionable message naming the file type mismatch and
the correct Krea2 openpose LoRA to load.
2026-09-14 22:22:25 +09:00
ussoewwin e347fc6aed Update node display name, README docs, and add diffsynth node image 2026-08-28 18:58:19 +09:00
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 035bad4737 fix-krea2-control-strength-and-ab-logging 2026-07-07 17:51:16 +09:00
ussoewwin f9f8de4fc4 fix-krea2-control-debug-logging 2026-07-07 17:41:17 +09:00
ussoewwin a47ca7d58d fix-krea2-control-latent-shape 2026-07-07 17:33:46 +09:00
ussoewwin 188bc831c7 feat-krea2-control-route 2026-07-07 17:11:22 +09:00
ussoewwin c19130957d \ fix: isolate controlnet routing by model family\
\Add strict route classification for ZI,Nunchaku QI,standard QI,and Krea2. Prevent fallback mixing by raising on unknown routes.\
2026-07-07 16:38:55 +09:00
ussoewwin 84d111a4fb \ feat: add Krea2 controlnet LoRA loader\
\Add a dedicated Krea2 ControlNet LoRA loader node and register it in node mappings. Keep control logic in the existing controlnet patcher and add Krea2 model detection there.\
2026-07-07 16:36:49 +09:00
ussoewwin 82cf43873d Fix DiffSynthCnetBlockReplace dynamic resizing by extracting x from call stack 2026-07-07 13:04:35 +09:00
ussoewwin 4d5c569ca4 Add debug logging for ControlNet patch on Nunchaku 2026-07-07 12:47:43 +09:00
ussoewwin c9235f8ce0 Fix DiffSynth ControlNet patch not working with Nunchaku Qwen Image 2026-07-07 12:22:42 +09:00
ussoewwin 3bd06a67c3 Restore all deleted files: programs, documentation, and add v2.2.4 changelog 2026-05-17 05:24:50 +09:00