Support mps generate (#263)

This commit is contained in:
Ftps
2023-05-10 22:17:13 +09:00
committed by GitHub
parent 5b0ff12163
commit 6cc2279fb9
2 changed files with 3 additions and 0 deletions

View File

@@ -86,6 +86,7 @@ class Config:
elif torch.backends.mps.is_available():
print("没有发现支持的N卡, 使用MPS进行推理")
self.device = "mps"
self.is_half = False
else:
print("没有发现支持的N卡, 使用CPU进行推理")
self.device = "cpu"