diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-07-12 23:53:26 +0300 |
---|---|---|
committer | AUTOMATIC1111 <16777216c@gmail.com> | 2023-07-12 23:53:26 +0300 |
commit | 60397a7800d7e01d9a75e0179e3d2c10aa0002a9 (patch) | |
tree | 92f6b8eec31e3811e29b377418ec6a5dcb613320 /modules/devices.py | |
parent | da464a3fb39ecc6ea7b22fe87271194480d8501c (diff) | |
parent | e5ca9877781bf2ce45edfb9c46ba532668c50de9 (diff) |
Merge branch 'dev' into sdxl
Diffstat (limited to 'modules/devices.py')
-rw-r--r-- | modules/devices.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/devices.py b/modules/devices.py index c5ad950f..57e51da3 100644 --- a/modules/devices.py +++ b/modules/devices.py @@ -54,8 +54,9 @@ def torch_gc(): with torch.cuda.device(get_cuda_device_string()): torch.cuda.empty_cache() torch.cuda.ipc_collect() - elif has_mps() and hasattr(torch.mps, 'empty_cache'): - torch.mps.empty_cache() + + if has_mps(): + mac_specific.torch_mps_gc() def enable_tf32(): |