fix broken resolution detection when pasting parameters with old hires fix enabled

This commit is contained in:
AUTOMATIC 2023-01-10 02:17:33 +03:00
parent b1d976dca2
commit 3fe9e9e54d
1 changed files with 3 additions and 3 deletions

View File

@ -198,10 +198,10 @@ def restore_old_hires_fix_params(res):
firstpass_height = res.get('First pass size-2', None) firstpass_height = res.get('First pass size-2', None)
if shared.opts.use_old_hires_fix_width_height: if shared.opts.use_old_hires_fix_width_height:
hires_width = int(res.get("Hires resize-1", None)) hires_width = int(res.get("Hires resize-1", 0))
hires_height = int(res.get("Hires resize-2", None)) hires_height = int(res.get("Hires resize-2", 0))
if hires_width is not None and hires_height is not None: if hires_width and hires_height:
res['Size-1'] = hires_width res['Size-1'] = hires_width
res['Size-2'] = hires_height res['Size-2'] = hires_height
return return