Add LoRA key mapping for LTXV/LTXAV models (#14349)

This commit is contained in:
kelseyee 2026-06-09 21:57:58 +08:00 committed by GitHub
parent 1639dc7a70
commit 07c53f8f0f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -357,6 +357,12 @@ def model_lora_keys_unet(model, key_map={}):
key_lora = k[len("diffusion_model."):-len(".weight")]
key_map["transformer.{}".format(key_lora)] = k
if isinstance(model, (comfy.model_base.LTXV, comfy.model_base.LTXAV)):
for k in sdk:
if k.startswith("diffusion_model.") and k.endswith(".weight"):
key_lora = k[len("diffusion_model."):-len(".weight")]
key_map["{}".format(key_lora)] = k
return key_map