Skip to content

Commit

Permalink
@
Browse files Browse the repository at this point in the history
  • Loading branch information
ljleb committed Nov 12, 2023
1 parent 1751f59 commit c69bb95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sd_meh/merge_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def rotate(a: Tensor, b: Tensor, alpha: float, beta: float, **kwargs):
a_2d = a.reshape(-1, a.shape[-1]).float()
b_2d = b.reshape(-1, b.shape[-1]).float()
svd_driver = "gesvd" if a.is_cuda else None
u, _, v_t = torch.linalg.svd(torch.matmul(a_2d.T, b_2d), driver=svd_driver)
u, _, v_t = torch.linalg.svd(a_2d.T @ b_2d, driver=svd_driver)

alpha_is_float = alpha != round(alpha)
if alpha_is_float:
Expand Down

0 comments on commit c69bb95

Please sign in to comment.