Skip to content

Commit 186171e

Browse files
committed
Merge branch 'dev'
2 parents 0f2eae5 + d2a810f commit 186171e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

exllamav2/vlm/processor/pixtral.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def preprocess(
1919
assert "longest_edge" in config.vision_size, \
2020
"preprocessing size must specify longest_edge"
2121

22-
patch_size = tuple(config.vision_patch_size[d] for d in ["height", "width"])
22+
patch_size = tuple(config.vision_patch_size[d] * 2 for d in ["height", "width"])
2323
longest_edge = config.vision_size["longest_edge"]
2424
resample = Image.Resampling(config.vision_resample)
2525
image_mean = tuple(config.vision_image_mean)

exllamav2/vlm/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def size_to_longest_edge_and_patch_size(
3636

3737
ratio = max(input_size[0] / max_size[0], input_size[1] / max_size[1])
3838
if ratio > 1:
39-
output_size = tuple(int(np.ceil(d / ratio)) for d in input_size)
39+
output_size = tuple(max(1, int(np.floor(d / ratio))) for d in input_size)
4040
else:
4141
output_size = input_size
4242

0 commit comments

Comments
 (0)