rework memory management for extras

now face post-processing uses gpu
close #312
This commit is contained in:
lllyasviel
2024-02-25 20:37:14 -08:00
parent a252bbcf16
commit 6287c73d98
10 changed files with 30 additions and 21 deletions

View File

@@ -50,10 +50,10 @@ def enable_tf32():
cpu: torch.device = torch.device("cpu")
fp8: bool = False
device: torch.device = model_management.get_torch_device()
device_interrogate: torch.device = cpu # not used
device_gfpgan: torch.device = cpu
device_esrgan: torch.device = model_management.get_torch_device() # will be managed in special way
device_codeformer: torch.device = cpu
device_interrogate: torch.device = model_management.text_encoder_device() # for backward compatibility, not used now
device_gfpgan: torch.device = model_management.get_torch_device() # will be managed by memory management system
device_esrgan: torch.device = model_management.get_torch_device() # will be managed by memory management system
device_codeformer: torch.device = model_management.get_torch_device() # will be managed by memory management system
dtype: torch.dtype = model_management.unet_dtype()
dtype_vae: torch.dtype = model_management.vae_dtype()
dtype_unet: torch.dtype = model_management.unet_dtype()