Support "transformer." LoRA prefix for Z-Image

Please try to be consistent in your LoRA loading code
Qwen supports the "transformer." prefix. This PR adds it to Z-Image (for some reason the code for Lumina2 is used for Z-Image)
This commit is contained in:
dxqb 2025-12-06 01:28:18 +01:00 committed by GitHub
parent bed12674a1
commit 51119d3283
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -320,6 +320,7 @@ def model_lora_keys_unet(model, key_map={}):
to = diffusers_keys[k]
key_lora = k[:-len(".weight")]
key_map["diffusion_model.{}".format(key_lora)] = to
key_map["transformer.{}".format(key_lora)] = to
key_map["lycoris_{}".format(key_lora.replace(".", "_"))] = to
return key_map