You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Z-Image LoRAs with only fused attention_qkv + attention_out keys are dropped, then fail on leftover alpha keys #14876
A Z-Image LoRA that only carries the model's original attention module names, a fused attention_qkv and a bare attention_out per block (what musubi-tuner and LyCORIS emit when trained against the original Z-Image module layout), cannot be loaded: _convert_non_diffusers_z_image_lora_to_diffusers drops both keys on the assumption that split to.q/k/v and to_out.0 keys are also present (the Anime-Z layout, where they are redundant), which empties the LoRA, and then raises ValueError: state_dict should be empty on the leftover .alpha keys of the out modules.
Expected: the fused qkv LoRA is split into to_q / to_k / to_v (chunks of the up weight along dim 0, like convert_z_image_fused_attention does for base weights) and out maps to to_out.0.
The same happens end to end through ZImagePipeline.load_lora_weights with a real file in that layout (dims 3840 → 11520 for qkv, 3840 → 3840 for out, 34 blocks).
Logs
ValueError: `state_dict` should be empty at this point but has state_dict.keys()=dict_keys(['context_refiner.0.attention.to_out.0.alpha', 'layers.0.attention.to_out.0.alpha'])
Without the .alpha keys the call succeeds and returns an empty dict: the whole LoRA is silently dropped.
System Info
diffusers main at e0118ad (also 0.40.0), torch 2.14.0, Python 3.12, Linux.
Activity