Fix scale_shorter_dimension portrait check

This commit is contained in:
nomadoor 2026-01-14 10:39:37 +09:00
parent 469dd9c16a
commit 2554bd5d27

View File

@ -329,7 +329,7 @@ def scale_shorter_dimension(input: torch.Tensor, shorter_size: int, scale_method
if height < width:
width = round((width / height) * shorter_size)
height = shorter_size
elif width > height:
elif width < height:
height = round((height / width) * shorter_size)
width = shorter_size
else: