Skip to content

Commit 1208863

Browse files
Fix "Comfy" lora keys.
They are in this format now: diffusion_model.full.model.key.name.lora_up.weight
1 parent e1c5281 commit 1208863

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

comfy/lora.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ def model_lora_keys_unet(model, key_map={}):
245245
key_lora = k[len("diffusion_model."):-len(".weight")].replace(".", "_")
246246
key_map["lora_unet_{}".format(key_lora)] = k
247247
key_map["lora_prior_unet_{}".format(key_lora)] = k #cascade lora: TODO put lora key prefix in the model config
248-
key_map["model.{}".format(k[:-len(".weight")])] = k #generic lora format without any weird key names
248+
key_map["{}".format(k[:-len(".weight")])] = k #generic lora format without any weird key names
249249

250250
diffusers_keys = comfy.utils.unet_to_diffusers(model.model_config.unet_config)
251251
for k in diffusers_keys:

0 commit comments

Comments
 (0)