Skip to content

Commit ed4d55d

Browse files
Add max num patches = 10 back for minicpmv
Signed-off-by: Alex-Brooks <[email protected]>
1 parent a36e120 commit ed4d55d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

examples/llava/llava.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,9 @@ bool llava_validate_embed_size(const llama_context * ctx_llama, const clip_ctx *
408408
bool llava_image_embed_make_with_clip_img(clip_ctx * ctx_clip, int n_threads, const clip_image_u8 * img, float ** image_embd_out, int * n_img_pos_out) {
409409
// Granite vision uses up to 10 patches + base patch
410410
int num_max_patches = 11;
411+
if (clip_is_minicpmv(ctx_clip)) {
412+
num_max_patches = 10;
413+
}
411414
if (clip_is_glm(ctx_clip)) {
412415
num_max_patches = 1;
413416
}

0 commit comments

Comments
 (0)