Merge pull request #16239 from AUTOMATIC1111/fix-upscale-logic

fix upscale logic
This commit is contained in:
AUTOMATIC1111 2024-07-20 11:41:34 +03:00 committed by GitHub
commit e09104a126
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -56,8 +56,8 @@ class Upscaler:
dest_w = int((img.width * scale) // 8 * 8)
dest_h = int((img.height * scale) // 8 * 8)
for _ in range(3):
if img.width >= dest_w and img.height >= dest_h and scale != 1:
for i in range(3):
if img.width >= dest_w and img.height >= dest_h and (i > 0 or scale != 1):
break
if shared.state.interrupted: