aboutsummaryrefslogtreecommitdiffstats
path: root/modules/devices.py
diff options
context:
space:
mode:
authorzhaohu xing <920232796@qq.com>2022-12-06 01:03:55 +0000
committerzhaohu xing <920232796@qq.com>2022-12-06 01:03:55 +0000
commit4929503258d80abbc4b5f40da034298fe3803906 (patch)
treec7af372ebf229811dfa21b19f7a64eab99e2e607 /modules/devices.py
parent9c86fb8cace6d8ac0843e0ddad0ba5ae7f3148c9 (diff)
downloadstable-diffusion-webui-gfx803-4929503258d80abbc4b5f40da034298fe3803906.tar.gz
stable-diffusion-webui-gfx803-4929503258d80abbc4b5f40da034298fe3803906.tar.bz2
stable-diffusion-webui-gfx803-4929503258d80abbc4b5f40da034298fe3803906.zip
fix bugs
Signed-off-by: zhaohu xing <920232796@qq.com>
Diffstat (limited to 'modules/devices.py')
-rw-r--r--modules/devices.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/devices.py b/modules/devices.py
index e69c1fe3..f00079c6 100644
--- a/modules/devices.py
+++ b/modules/devices.py
@@ -38,8 +38,8 @@ def get_optimal_device():
if torch.cuda.is_available():
return torch.device(get_cuda_device_string())
- # if has_mps():
- # return torch.device("mps")
+ if has_mps():
+ return torch.device("mps")
return cpu