Fix/Revert opts name from GAN to ESRGAN

This commit is contained in:
d8ahazard 2022-09-21 08:38:38 -05:00 committed by AUTOMATIC1111
parent 9a93a82b82
commit 4f434c8aea
2 changed files with 4 additions and 4 deletions

View file

@ -92,10 +92,10 @@ def upscale_without_tiling(model, img):
def esrgan_upscale(model, img): def esrgan_upscale(model, img):
if opts.GAN_tile == 0: if opts.ESRGAN_tile == 0:
return upscale_without_tiling(model, img) 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 = [] newtiles = []
scale_factor = 1 scale_factor = 1

View file

@ -96,8 +96,8 @@ def upscale_with_realesrgan(image, RealESRGAN_upscaling, RealESRGAN_model_index)
model_path=info.location, model_path=info.location,
model=model, model=model,
half=not cmd_opts.no_half, half=not cmd_opts.no_half,
tile=opts.GAN_tile, tile=opts.ESRGAN_tile,
tile_pad=opts.GAN_tile_overlap, tile_pad=opts.ESRGAN_tile_overlap,
) )
upsampled = upsampler.enhance(np.array(image), outscale=RealESRGAN_upscaling)[0] upsampled = upsampler.enhance(np.array(image), outscale=RealESRGAN_upscaling)[0]