Skip to content

Commit

Permalink
Support loras based on the stability unet implementation.
Browse files Browse the repository at this point in the history
  • Loading branch information
comfyanonymous committed Jun 26, 2023
1 parent c71a7e6 commit b72a7a8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions comfy/sd.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,11 @@ def model_lora_keys(model, key_map={}):
if key_in:
counter += 1

for k in sdk:
if k.startswith("diffusion_model.") and k.endswith(".weight"):
key_lora = k[len("diffusion_model."):-len(".weight")].replace(".", "_")
key_map["lora_unet_{}".format(key_lora)] = k

return key_map


Expand Down

0 comments on commit b72a7a8

Please sign in to comment.