From 7b2b536a811c84831e2c67eb388872b7c83a8263 Mon Sep 17 00:00:00 2001 From: litianjian <45817262+litianjian@users.noreply.github.com> Date: Sat, 21 Sep 2024 07:34:42 +0800 Subject: [PATCH] Fix typos (#33583) Co-authored-by: litianjian --- .../models/llava_onevision/modeling_llava_onevision.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/transformers/models/llava_onevision/modeling_llava_onevision.py b/src/transformers/models/llava_onevision/modeling_llava_onevision.py index d3200fb5193d4b..593500c2e404e1 100644 --- a/src/transformers/models/llava_onevision/modeling_llava_onevision.py +++ b/src/transformers/models/llava_onevision/modeling_llava_onevision.py @@ -475,8 +475,8 @@ def apply_pooling(self, image_features): image_features = image_features.view(batch_frames, height, width, -1) image_features = image_features.permute(0, 3, 1, 2).contiguous() - height, weight = image_features.shape[2:] - scaled_shape = [math.ceil(height / 2), math.ceil(weight / 2)] + height, width = image_features.shape[2:] + scaled_shape = [math.ceil(height / 2), math.ceil(width / 2)] image_features = nn.functional.interpolate(image_features, size=scaled_shape, mode="bilinear") image_features = image_features.permute(0, 2, 3, 1)