InvokeAI/invokeai
Alexander Eichhorn 355c985cc3 fix(model-manager): add Z-Image LoRA/DoRA detection and loading support
Two fixes for Z-Image LoRA support:

1. Override _validate_looks_like_lora in LoRA_LyCORIS_ZImage_Config to
   recognize Z-Image specific LoRA formats that use different key patterns
   than SD/SDXL LoRAs. Z-Image LoRAs use lora_down.weight/lora_up.weight
   and dora_scale suffixes instead of lora_A.weight/lora_B.weight.

2. Fix _group_by_layer in z_image_lora_conversion_utils.py to correctly
   group LoRA keys by layer name. The previous logic used rsplit with
   maxsplit=2 which incorrectly grouped keys like:
   - "to_k.alpha" -> layer "diffusion_model.layers.17.attention"
   - "lora_down.weight" -> layer "diffusion_model.layers.17.attention.to_k"

   Now uses suffix matching to ensure all keys for a layer are grouped
   together (alpha, dora_scale, lora_down.weight, lora_up.weight).
2025-12-27 09:17:29 +01:00
..
app Feature: Add Z-Image-Turbo regional guidance (#8672) 2025-12-26 02:25:38 +00:00
assets
backend fix(model-manager): add Z-Image LoRA/DoRA detection and loading support 2025-12-27 09:17:29 +01:00
configs
frontend Feature: Add Z-Image-Turbo regional guidance (#8672) 2025-12-26 02:25:38 +00:00
invocation_api feat(mm): more exports in invocation api 2025-10-16 08:08:44 +11:00
version (chore) Prep for v6.10.0rc2 (#8701) 2025-12-26 18:26:04 -05:00
__init__.py