aboutsummaryrefslogtreecommitdiffstats
path: root/modules/devices.py
diff options
context:
space:
mode:
authorZac Liu <liuguang@baai.ac.cn>2022-12-06 01:17:57 +0000
committerGitHub <noreply@github.com>2022-12-06 01:17:57 +0000
commita25dfebeed5b3411f2dc0f558c2b87a7c1cda420 (patch)
tree77f08a174aba15584282670ab3714ab88a76612c /modules/devices.py
parent3ebf977a6e4f478ab918e44506974beee32da276 (diff)
parent4929503258d80abbc4b5f40da034298fe3803906 (diff)
downloadstable-diffusion-webui-gfx803-a25dfebeed5b3411f2dc0f558c2b87a7c1cda420.tar.gz
stable-diffusion-webui-gfx803-a25dfebeed5b3411f2dc0f558c2b87a7c1cda420.tar.bz2
stable-diffusion-webui-gfx803-a25dfebeed5b3411f2dc0f558c2b87a7c1cda420.zip
Merge pull request #3 from 920232796/master
fix device support for mps update the support for SD2.0
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 397b4b95..f8cffae1 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