mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-01-10 18:05:16 +00:00
replace 'diffusion_model' with 'transformer'
This commit is contained in:
parent
21f20638bd
commit
ceee378d86
@ -401,9 +401,9 @@ def model_lora_keys_unet(model, key_map={}):
|
||||
|
||||
if isinstance(model, comfy.model_base.LTXV):
|
||||
for k in sdk:
|
||||
if k.startswith("transformer.") and k.endswith(".weight"): #Official Mochi lora format
|
||||
key_lora = k[len("transformer."):-len(".weight")]
|
||||
key_map["{}".format(key_lora)] = k
|
||||
if k.startswith("diffusion_model.") and k.endswith(".weight"):
|
||||
key_lora = k[len("diffusion_model."):-len(".weight")]
|
||||
key_map["transformer.{}".format(key_lora)] = k
|
||||
|
||||
return key_map
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user