aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/devices.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/devices.py b/modules/devices.py
index 9a3d29d7..bd3e4ffb 100644
--- a/modules/devices.py
+++ b/modules/devices.py
@@ -6,7 +6,7 @@ from modules import errors
# has_mps is only available in nightly pytorch (for now) and MasOS 12.3+.
# check `getattr` and try it for compatibility
def has_mps() -> bool:
- if getattr(torch, 'has_mps', False): return False
+ if not getattr(torch, 'has_mps', False): return False
try:
torch.zeros(1).to(torch.device("mps"))
return True