aboutsummaryrefslogtreecommitdiffstats
path: root/modules/devices.py
diff options
context:
space:
mode:
authorbrkirch <brkirch@users.noreply.github.com>2022-10-04 05:04:19 +0000
committerGitHub <noreply@github.com>2022-10-04 05:04:19 +0000
commitb88e4ea7d6536ddc814a9101a258f87b06230019 (patch)
tree913bdda300b7082aa61429689d0a730cecda1525 /modules/devices.py
parentbdaa36c84470adbdce3e98c01a69af5e95adfb02 (diff)
parent2865ef4b9ab16d56326cc805541bebcf01d099bc (diff)
downloadstable-diffusion-webui-gfx803-b88e4ea7d6536ddc814a9101a258f87b06230019.tar.gz
stable-diffusion-webui-gfx803-b88e4ea7d6536ddc814a9101a258f87b06230019.tar.bz2
stable-diffusion-webui-gfx803-b88e4ea7d6536ddc814a9101a258f87b06230019.zip
Merge branch 'master' into master
Diffstat (limited to 'modules/devices.py')
-rw-r--r--modules/devices.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/modules/devices.py b/modules/devices.py
index 08bb26d6..5d9c7a07 100644
--- a/modules/devices.py
+++ b/modules/devices.py
@@ -32,10 +32,9 @@ def enable_tf32():
errors.run(enable_tf32, "Enabling TF32")
-
device = get_optimal_device()
device_gfpgan = device_codeformer = cpu if device.type == 'mps' else device
-
+dtype = torch.float16
def randn(seed, shape):
# Pytorch currently doesn't handle setting randomness correctly when the metal backend is used.