mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-19 03:35:22 +08:00
Fix scale_shorter_dimension portrait check (#11862)
This commit is contained in:
@ -329,7 +329,7 @@ def scale_shorter_dimension(input: torch.Tensor, shorter_size: int, scale_method
|
|||||||
if height < width:
|
if height < width:
|
||||||
width = round((width / height) * shorter_size)
|
width = round((width / height) * shorter_size)
|
||||||
height = shorter_size
|
height = shorter_size
|
||||||
elif width > height:
|
elif width < height:
|
||||||
height = round((height / width) * shorter_size)
|
height = round((height / width) * shorter_size)
|
||||||
width = shorter_size
|
width = shorter_size
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user