1
0
Fork 0

fix(api): swap dimensions for non-upscaling highres modes

This commit is contained in:
Sean Sube 2023-06-15 22:39:16 -05:00
parent 7b0bed7aea
commit f8d59ab65a
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
1 changed files with 3 additions and 7 deletions

View File

@ -147,18 +147,14 @@ def run_highres(
)
def highres_tile(tile: Image.Image, dims):
scaled_size = (size.height * highres.scale, size.width * highres.scale)
scaled_size = (size.width * highres.scale, size.height * highres.scale)
if highres.method == "bilinear":
logger.debug("using bilinear interpolation for highres")
tile = tile.resize(
scaled_size, resample=Image.Resampling.BILINEAR
)
tile = tile.resize(scaled_size, resample=Image.Resampling.BILINEAR)
elif highres.method == "lanczos":
logger.debug("using Lanczos interpolation for highres")
tile = tile.resize(
scaled_size, resample=Image.Resampling.LANCZOS
)
tile = tile.resize(scaled_size, resample=Image.Resampling.LANCZOS)
else:
logger.debug("using upscaling pipeline for highres")
tile = run_upscale_correction(