mirror of
https://github.com/vladmandic/automatic
synced 2026-09-02 02:50:47 +02:00
65e59e7224
Add three adapter families to the z-image native loader and chain them with the existing lora path through load_safetensors. Mixed-family files (for example gta6_amateur_photography_zimagebase_v2.safetensors, which carries lora and lokr groups in the same file) now load completely instead of having one family silently dropped. Shared helpers in pipelines/z_image/zimage_lora.py parse keys by suffix list, rename legacy attention.out and attention.wo to attention.to_out.0, and split fused attention.qkv into to_q/k/v. For lora the split chunks the up weight along dim 0. For lokr the split emits three NetworkModuleLokrChunk entries that share the tensors and slice the kronecker product at apply time. Fused attention.qkv for loha and oft is skipped with a warning. No NetworkModuleHadaChunk exists, oft rotations are tied to out_features and cannot be cleanly split across q/k/v, and no real z-image adapter in that layout exists today. load_safetensors for zimage chains try_load_lora, try_load_lokr, try_load_loha and try_load_oft and merges their module dicts into a single Network so mixed files load every module.