Skip to content

Commit

Permalink
Revert performance improvement, because it caused flux inference to f…
Browse files Browse the repository at this point in the history
…ail on Mac: #7422
  • Loading branch information
RyanJDick committed Dec 3, 2024
1 parent 5eb3820 commit 0bff4ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion invokeai/backend/flux/math.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ def apply_rope(xq: Tensor, xk: Tensor, freqs_cis: Tensor) -> tuple[Tensor, Tenso
xk_ = xk.view(*xk.shape[:-1], -1, 1, 2)
xq_out = freqs_cis[..., 0] * xq_[..., 0] + freqs_cis[..., 1] * xq_[..., 1]
xk_out = freqs_cis[..., 0] * xk_[..., 0] + freqs_cis[..., 1] * xk_[..., 1]
return xq_out.view(*xq.shape), xk_out.view(*xk.shape)
return xq_out.view(*xq.shape).type_as(xq), xk_out.view(*xk.shape).type_as(xk)

0 comments on commit 0bff4ac

Please sign in to comment.