diff options
author | Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com> | 2024-01-09 14:11:44 +0000 |
---|---|---|
committer | Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com> | 2024-01-09 14:11:44 +0000 |
commit | 209c26a1cb9e4be357ab3c5e7613caf3cbc26183 (patch) | |
tree | 977aded65d45eb72b9daadf63fa69d4960d6e004 /modules/shared_init.py | |
parent | 6869d95890849c9b209bb66774539bfdf870df2c (diff) | |
download | stable-diffusion-webui-gfx803-209c26a1cb9e4be357ab3c5e7613caf3cbc26183.tar.gz stable-diffusion-webui-gfx803-209c26a1cb9e4be357ab3c5e7613caf3cbc26183.tar.bz2 stable-diffusion-webui-gfx803-209c26a1cb9e4be357ab3c5e7613caf3cbc26183.zip |
improve efficiency and support more device
Diffstat (limited to 'modules/shared_init.py')
-rw-r--r-- | modules/shared_init.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/shared_init.py b/modules/shared_init.py index 586be342..935e3a21 100644 --- a/modules/shared_init.py +++ b/modules/shared_init.py @@ -29,6 +29,7 @@ def initialize(): devices.dtype = torch.float32 if cmd_opts.no_half else torch.float16
devices.dtype_vae = torch.float32 if cmd_opts.no_half or cmd_opts.no_half_vae else torch.float16
+ devices.dtype_inference = torch.float32 if cmd_opts.precision == 'full' else devices.dtype
shared.device = devices.device
shared.weight_load_location = None if cmd_opts.lowram else "cpu"
|