mirror of
https://github.com/lllyasviel/stable-diffusion-webui-forge.git
synced 2026-04-20 14:29:14 +00:00
i
This commit is contained in:
@@ -48,7 +48,7 @@ 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 = cpu # not used
|
||||
device_esrgan: torch.device = model_management.get_torch_device() # will be managed in special way
|
||||
device_codeformer: torch.device = cpu
|
||||
dtype: torch.dtype = model_management.unet_dtype()
|
||||
dtype_vae: torch.dtype = model_management.vae_dtype()
|
||||
|
||||
@@ -6,6 +6,12 @@ from PIL import Image
|
||||
|
||||
import modules.shared
|
||||
from modules import modelloader, shared
|
||||
from ldm_patched.modules import model_management
|
||||
|
||||
|
||||
def prepare_free_memory():
|
||||
model_management.free_memory(memory_required=1024*1024*3, device=model_management.get_torch_device())
|
||||
|
||||
|
||||
LANCZOS = (Image.Resampling.LANCZOS if hasattr(Image, 'Resampling') else Image.LANCZOS)
|
||||
NEAREST = (Image.Resampling.NEAREST if hasattr(Image, 'Resampling') else Image.NEAREST)
|
||||
|
||||
Reference in New Issue
Block a user