Merge pull request #389 from jitsuCM/arr_fix

Quick fix for special case no-upscale 1.0 upscale
This commit is contained in:
K4YT3X 2020-10-26 22:09:04 +00:00 committed by GitHub
commit 43dbb134b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -625,6 +625,11 @@ class Upscaler:
remaining_scaling_ratio = math.ceil(output_scale)
self.scaling_jobs = []
# if the scaling ratio is 1.0
# apply the smallest scaling ratio available
if remaining_scaling_ratio == 1:
self.scaling_jobs.append(supported_scaling_ratios[0])
else:
while remaining_scaling_ratio > 1:
for ratio in supported_scaling_ratios:
if ratio >= remaining_scaling_ratio:
@ -633,7 +638,6 @@ class Upscaler:
break
else:
found = False
for i in supported_scaling_ratios:
for j in supported_scaling_ratios: