aboutsummaryrefslogtreecommitdiffstats
path: root/modules/devices.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2022-10-02 18:33:22 +0000
committerGitHub <noreply@github.com>2022-10-02 18:33:22 +0000
commit688c4a914a6cb152b5f5e4088bace709ed3dcc35 (patch)
tree39c3221e99ca90b7238057bc555c5b4d63fcf960 /modules/devices.py
parenta634c3226fd69486ce96df56f95f3fd63172305c (diff)
parent852fd90c0dcda9cb5fbbfdf0c7308ce58034935c (diff)
downloadstable-diffusion-webui-gfx803-688c4a914a6cb152b5f5e4088bace709ed3dcc35.tar.gz
stable-diffusion-webui-gfx803-688c4a914a6cb152b5f5e4088bace709ed3dcc35.tar.bz2
stable-diffusion-webui-gfx803-688c4a914a6cb152b5f5e4088bace709ed3dcc35.zip
Merge branch 'master' into 1404-script-reload-without-restart
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.