diff options
author | AUTOMATIC <16777216c@gmail.com> | 2022-10-02 12:03:39 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2022-10-02 12:03:39 +0000 |
commit | 820f1dc96b1979d7e92170c161db281ee8bd988b (patch) | |
tree | c2b04366563537cddc4cdb2e65a94da2a8d90fc8 /modules/devices.py | |
parent | 84e97a98c5233119d0f444e0a3a0f6391da23677 (diff) | |
download | stable-diffusion-webui-gfx803-820f1dc96b1979d7e92170c161db281ee8bd988b.tar.gz stable-diffusion-webui-gfx803-820f1dc96b1979d7e92170c161db281ee8bd988b.tar.bz2 stable-diffusion-webui-gfx803-820f1dc96b1979d7e92170c161db281ee8bd988b.zip |
initial support for training textual inversion
Diffstat (limited to 'modules/devices.py')
-rw-r--r-- | modules/devices.py | 3 |
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. |