performance: use tiling for upscaling for better use of memory

This commit is contained in:
Bryce 2023-01-22 08:23:59 -08:00 committed by Bryce Drennan
parent 5db67f9a0d
commit 00408d176f
2 changed files with 2 additions and 2 deletions

View File

@ -296,7 +296,7 @@ def imagine_cmd(
model_config_path,
prompt_library_path,
version, # noqa
make_gif
make_gif,
)

View File

@ -17,7 +17,7 @@ def realesrgan_upsampler():
)
url = "https://github.com/xinntao/Real-ESRGAN/releases/download/v0.1.0/RealESRGAN_x4plus.pth"
model_path = get_cached_url_path(url)
upsampler = RealESRGANer(scale=4, model_path=model_path, model=model, tile=0)
upsampler = RealESRGANer(scale=4, model_path=model_path, model=model, tile=512)
device = get_device()
if "mps" in device: