aboutsummaryrefslogtreecommitdiffstats
path: root/modules/devices.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2022-10-02 14:03:01 +0000
committerGitHub <noreply@github.com>2022-10-02 14:03:01 +0000
commita9d7eb722f9034d1d2203dada6d79651ad3edeec (patch)
treef622f9f86b77a46f673a08084d4a10db59aeff40 /modules/devices.py
parentf28ce3e3a17ccd9b4a03317031a4e3caa1a3088f (diff)
parent4e72a1aab6d1b3a8d8c09fadc81843a07c05cc18 (diff)
downloadstable-diffusion-webui-gfx803-a9d7eb722f9034d1d2203dada6d79651ad3edeec.tar.gz
stable-diffusion-webui-gfx803-a9d7eb722f9034d1d2203dada6d79651ad3edeec.tar.bz2
stable-diffusion-webui-gfx803-a9d7eb722f9034d1d2203dada6d79651ad3edeec.zip
Merge branch 'master' into saving
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 07bb2339..ff82f2f6 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_codeformer = cpu if has_mps else device
-
+dtype = torch.float16
def randn(seed, shape):
# Pytorch currently doesn't handle setting randomness correctly when the metal backend is used.