Quick fix for special case no-upscale 1.0 upscale

This commit is contained in:
jitsuCM 2020-10-22 09:17:48 +02:00 committed by jitsuCM
parent b37acfa31d
commit c2f1e43656

View File

@ -625,6 +625,10 @@ class Upscaler:
remaining_scaling_ratio = math.ceil(output_scale)
self.scaling_jobs = []
# special case for 1.0 upscale ratio
if remaining_scaling_ratio == 1:
self.scaling_jobs.append(1)
else:
while remaining_scaling_ratio > 1:
for ratio in supported_scaling_ratios:
if ratio >= remaining_scaling_ratio: