From 6785fabefb57e95f563527ce6171ec4fa9ea6b7d Mon Sep 17 00:00:00 2001 From: AUTOMATIC <16777216c@gmail.com> Date: Wed, 21 Sep 2022 09:09:20 +0300 Subject: [PATCH] Revert "fix for swininr PR breaking ESRGAN for new users" This reverts commit 8d1d64f9a238272d7a166d21e25cf529c09b2ad5. --- modules/esrgan_model.py | 4 ++-- modules/realesrgan_model.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/esrgan_model.py b/modules/esrgan_model.py index 930e790c6..7f3baf31f 100644 --- a/modules/esrgan_model.py +++ b/modules/esrgan_model.py @@ -92,10 +92,10 @@ def upscale_without_tiling(model, img): def esrgan_upscale(model, img): - if opts.GAN_tile == 0: + if opts.ESRGAN_tile == 0: return upscale_without_tiling(model, img) - grid = modules.images.split_grid(img, opts.GAN_tile, opts.GAN_tile, opts.GAN_tile_overlap) + grid = modules.images.split_grid(img, opts.ESRGAN_tile, opts.ESRGAN_tile, opts.ESRGAN_tile_overlap) newtiles = [] scale_factor = 1 diff --git a/modules/realesrgan_model.py b/modules/realesrgan_model.py index 8873b3819..e2cef0c8d 100644 --- a/modules/realesrgan_model.py +++ b/modules/realesrgan_model.py @@ -77,7 +77,7 @@ def upscale_with_realesrgan(image, RealESRGAN_upscaling, RealESRGAN_model_index) model_path=info.location, model=model, half=not cmd_opts.no_half, - tile=opts.GAN_tile, + tile=opts.ESRGAN_tile, tile_pad=opts.ESRGAN_tile_overlap, )