Skip to content

Commit 7930a8a

Browse files
cmp-nctJohn
andauthored
llaba : hotfix for llava-1.6 image number (#5495)
Co-authored-by: John <[email protected]>
1 parent 704359e commit 7930a8a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/llava/llava.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ static bool clip_llava_handle_patches(clip_ctx * ctx_clip, std::vector<float *>
100100
int num_patches_width = grid_shape.first; // grid 1-4
101101
int num_patches_height = grid_shape.second; // grid 1-4
102102

103-
const size_t num_images = num_patches_width + num_patches_height + 1;
103+
const size_t num_images = num_patches_width * num_patches_height + 1;
104104

105105
// TODO: size calculation is not calculated - it's only tens of MB
106106
size_t ctx_size = 0;

0 commit comments

Comments
 (0)