diff --git a/comfy/lora.py b/comfy/lora.py index eb95d02a..ad951bba 100644 --- a/comfy/lora.py +++ b/comfy/lora.py @@ -201,6 +201,9 @@ def load_lora(lora, to_load): def model_lora_keys_clip(model, key_map={}): sdk = model.state_dict().keys() + for k in sdk: + if k.endswith(".weight"): + key_map["text_encoders.{}".format(k[:-len(".weight")])] = k #generic lora format without any weird key names text_model_lora_key = "lora_te_text_model_encoder_layers_{}_{}" clip_l_present = False