fix mac mps dtype must be float32

This commit is contained in:
Gong Junmin
2025-05-07 12:09:39 +08:00
parent 0e05a27c2f
commit 6da343dfab
2 changed files with 8 additions and 7 deletions
+2 -2
View File
@@ -68,8 +68,8 @@ class ACEStepPipeline:
if device.type == "cpu" and torch.backends.mps.is_available():
device = torch.device("mps")
self.dtype = torch.bfloat16 if dtype == "bfloat16" else torch.float32
if device.type == "mps" and self.dtype == torch.bfloat16:
self.dtype = torch.float16
if device.type == "mps":
self.dtype = torch.float32
self.device = device
self.loaded = False
self.torch_compile = torch_compile