From 00408d176ffcaa50b686b959239c9257d2fb1be0 Mon Sep 17 00:00:00 2001 From: Bryce Date: Sun, 22 Jan 2023 08:23:59 -0800 Subject: [PATCH] performance: use tiling for upscaling for better use of memory --- imaginairy/cmds.py | 2 +- imaginairy/enhancers/upscale_realesrgan.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/imaginairy/cmds.py b/imaginairy/cmds.py index 07f50de..1c6ebf1 100644 --- a/imaginairy/cmds.py +++ b/imaginairy/cmds.py @@ -296,7 +296,7 @@ def imagine_cmd( model_config_path, prompt_library_path, version, # noqa - make_gif + make_gif, ) diff --git a/imaginairy/enhancers/upscale_realesrgan.py b/imaginairy/enhancers/upscale_realesrgan.py index 7c7d4de..ed28765 100644 --- a/imaginairy/enhancers/upscale_realesrgan.py +++ b/imaginairy/enhancers/upscale_realesrgan.py @@ -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: