From 5430564e7f88979fc056d859c2334a9cda8a4c4a Mon Sep 17 00:00:00 2001 From: kijai <40791699+kijai@users.noreply.github.com> Date: Sat, 1 Jun 2024 16:07:44 +0300 Subject: [PATCH] Update image_nodes.py --- nodes/image_nodes.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nodes/image_nodes.py b/nodes/image_nodes.py index f25e796..5b724fa 100644 --- a/nodes/image_nodes.py +++ b/nodes/image_nodes.py @@ -1325,9 +1325,9 @@ highest dimension. if height_input: height = height_input if get_image_size is not None: - _, width, height, _ = get_image_size.shape + _, height, width, _ = get_image_size.shape - if keep_proportion: + if keep_proportion and get_image_size is None: # If one of the dimensions is zero, calculate it to maintain the aspect ratio if width == 0 and height != 0: ratio = height / H @@ -1346,7 +1346,7 @@ highest dimension. if height == 0: height = H - if divisible_by > 1: + if divisible_by > 1 and get_image_size is None: width = width - (width % divisible_by) height = height - (height % divisible_by)