From 928a9b44ae74b82dfec986ddec67785a068159bf Mon Sep 17 00:00:00 2001 From: zhzluke96 Date: Thu, 1 Aug 2024 16:30:17 +0800 Subject: [PATCH] :bug: fix mps error msg --- modules/devices/mac_devices.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/devices/mac_devices.py b/modules/devices/mac_devices.py index fad6ef7..e5d1375 100644 --- a/modules/devices/mac_devices.py +++ b/modules/devices/mac_devices.py @@ -20,8 +20,8 @@ def check_for_mps() -> bool: else: try: return torch.backends.mps.is_available() and torch.backends.mps.is_built() - except: - logger.warning("MPS garbage collection failed", exc_info=True) + except Exception as e: + logger.warning("MPS check failed: %s", exc_info=True) return False