Skip to content

Commit 6557523

Browse files
Include base patch for granite vision allocation
Signed-off-by: Alex-Brooks <[email protected]>
1 parent 7bab305 commit 6557523

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/llava/llava.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,8 +406,8 @@ bool llava_validate_embed_size(const llama_context * ctx_llama, const clip_ctx *
406406
}
407407

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) {
409-
// Minicpmv / granite vision use 10 patches
410-
int num_max_patches = 10;
409+
// Granite vision uses up to 10 patches + base patch
410+
int num_max_patches = 11;
411411
if (clip_is_glm(ctx_clip)) {
412412
num_max_patches = 1;
413413
}

0 commit comments

Comments
 (0)