Support old diffusion-pipe hunyuan video loras.

This commit is contained in:
comfyanonymous 2024-12-18 06:21:29 -05:00
parent 4c5c4ddeda
commit ff2ff02168

View File

@ -384,6 +384,7 @@ def model_lora_keys_unet(model, key_map={}):
key_lora = key_lora.replace(".modulation.lin.", ".modulation.linear.") key_lora = key_lora.replace(".modulation.lin.", ".modulation.linear.")
key_lora = key_lora[len("diffusion_model."):-len(".weight")] key_lora = key_lora[len("diffusion_model."):-len(".weight")]
key_map["transformer.{}".format(key_lora)] = k key_map["transformer.{}".format(key_lora)] = k
key_map["diffusion_model.{}".format(key_lora)] = k # Old loras
return key_map return key_map