Skip to content

Commit

Permalink
fix : save lora 16 precision (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
cloneofsimo authored Dec 29, 2022
1 parent 5240d32 commit 35653d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lora_diffusion/lora.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ def save_lora_weight(
for _up, _down in extract_lora_ups_down(
model, target_replace_module=target_replace_module
):
weights.append(_up.weight)
weights.append(_down.weight)
weights.append(_up.weight.to("cpu").to(torch.float16))
weights.append(_down.weight.to("cpu").to(torch.float16))

torch.save(weights, path)

Expand Down

0 comments on commit 35653d2

Please sign in to comment.