Skip to content

Commit

Permalink
Merge pull request #70 from rhymes-ai/vllm_split_images
Browse files Browse the repository at this point in the history
fix(vllm): area calculation to use width instead of height twice
  • Loading branch information
xffxff authored Nov 14, 2024
2 parents ac64fac + 1db1e26 commit 0f950fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aria/vllm/aria.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ def _select_best_resolution(
aspect_ratio = img_width / img_height
best_ratio_diff = float("inf")
best_ratio_w, best_ratio_h = 1, 1
area = np.int32(img_height) * np.int32(img_height)
area = np.int32(img_width) * np.int32(img_height)
for ratio in target_ratios:
target_aspect_ratio = ratio[0] / ratio[1]
ratio_diff = abs(aspect_ratio - target_aspect_ratio)
Expand Down

0 comments on commit 0f950fd

Please sign in to comment.