Skip to content

Commit 9cc59ba

Browse files
authored
[Contributor Experience] Fix test collection on MPS (#6808)
* Update testing_utils.py * Update testing_utils.py
1 parent adcbe67 commit 9cc59ba

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/diffusers/utils/testing_utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -854,6 +854,8 @@ def _is_torch_fp64_available(device):
854854

855855
import torch
856856

857+
device = torch.device(device)
858+
857859
try:
858860
x = torch.zeros((2, 2), dtype=torch.float64).to(device)
859861
_ = torch.mul(x, x)

0 commit comments

Comments
 (0)