Commit e09104a1 authored by AUTOMATIC1111's avatar AUTOMATIC1111 Committed by GitHub

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

fix upscale logic
parents 141d4b71 964fc13a
...@@ -56,8 +56,8 @@ class Upscaler: ...@@ -56,8 +56,8 @@ class Upscaler:
dest_w = int((img.width * scale) // 8 * 8) dest_w = int((img.width * scale) // 8 * 8)
dest_h = int((img.height * scale) // 8 * 8) dest_h = int((img.height * scale) // 8 * 8)
for _ in range(3): for i in range(3):
if img.width >= dest_w and img.height >= dest_h and scale != 1: if img.width >= dest_w and img.height >= dest_h and (i > 0 or scale != 1):
break break
if shared.state.interrupted: if shared.state.interrupted:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment