mirror of
https://github.com/lllyasviel/stable-diffusion-webui-forge.git
synced 2026-06-04 21:05:48 +08:00
parent
4f7f815b9f
commit
2467c88c50
@ -19,7 +19,7 @@ def attention(q, k, v, pe):
|
||||
|
||||
|
||||
def rope(pos, dim, theta):
|
||||
if pos.device.type == "mps":
|
||||
if pos.device.type == "mps" or pos.device.type == "xpu":
|
||||
scale = torch.arange(0, dim, 2, dtype=torch.float32, device=pos.device) / dim
|
||||
else:
|
||||
scale = torch.arange(0, dim, 2, dtype=torch.float64, device=pos.device) / dim
|
||||
|
||||
Loading…
Reference in New Issue
Block a user