mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2025-01-09 04:18:46 +08:00
Revert FLUX performance improvement that fails on MacOS (#7423)
## Summary https://github.com/invoke-ai/InvokeAI/issues/7422 As reported in the above ticket, a recent FLUX performance improvement caused a regression on MacOS. This PR reverts the offending part of the change. ## Related Issues / Discussions - Closes #7422 - Original perf improvement: https://github.com/invoke-ai/InvokeAI/pull/7399 ## QA Instructions I don't have a Mac capable of running this test, so trusting the report in #7422 that this fixes the problem. ## Checklist - [x] _The PR has a short but descriptive title, suitable for a changelog_ - [x] _Tests added / updated (if applicable)_ - [x] _Documentation added / updated (if applicable)_ - [ ] _Updated `What's New` copy (if doing a release after this PR)_
This commit is contained in:
commit
c90736093f
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user