From eb60705e8295e6afff29bd46befe1172e5a4a48e Mon Sep 17 00:00:00 2001 From: matt3o Date: Tue, 26 Mar 2024 14:59:59 +0100 Subject: [PATCH] fix prepimage pad --- IPAdapterPlus.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IPAdapterPlus.py b/IPAdapterPlus.py index 865b144..bf94b0e 100644 --- a/IPAdapterPlus.py +++ b/IPAdapterPlus.py @@ -1026,7 +1026,7 @@ class PrepImageForClipVision: _, oh, ow, _ = image.shape output = image.permute([0,3,1,2]) - if crop_position == "pad": + if crop_position == "pad" and oh != ow: if oh > ow: pad = (oh - ow) // 2 pad = (pad, 0, pad, 0)