improve efficiency and support more device

This commit is contained in:
Kohaku-Blueleaf 2024-01-09 22:11:44 +08:00
parent 6869d95890
commit 209c26a1cb
2 changed files with 44 additions and 17 deletions

View file

@ -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"