Skip to content

Commit

Permalink
scale conv2d as well
Browse files Browse the repository at this point in the history
  • Loading branch information
cloneofsimo committed Jan 14, 2023
1 parent 7dca434 commit 204d6ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lora_diffusion/lora.py
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@ def monkeypatch_add_lora(

def tune_lora_scale(model, alpha: float = 1.0):
for _module in model.modules():
if _module.__class__.__name__ == "LoraInjectedLinear":
if _module.__class__.__name__ in ["LoraInjectedLinear", "LoraInjectedConv2d"]:
_module.scale = alpha


Expand Down

0 comments on commit 204d6ed

Please sign in to comment.