summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn <78893154+cmp-nct@users.noreply.github.com>2024-02-15 08:59:18 +0100
committerGitHub <noreply@github.com>2024-02-15 09:59:18 +0200
commit7930a8a6e89a04c77c51e3ae5dc1cd8e845b6b8f (patch)
treea45005a0d8fc78173dbc1cf70717eee6dc603b48
parent704359e29985a06a389337a2617b7f3fa8eff908 (diff)
llaba : hotfix for llava-1.6 image number (#5495)
Co-authored-by: John <cmt-nct@users.noreply.github.com>
-rw-r--r--examples/llava/llava.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/llava/llava.cpp b/examples/llava/llava.cpp
index 22953417..4ed310a0 100644
--- a/examples/llava/llava.cpp
+++ b/examples/llava/llava.cpp
@@ -100,7 +100,7 @@ static bool clip_llava_handle_patches(clip_ctx * ctx_clip, std::vector<float *>
int num_patches_width = grid_shape.first; // grid 1-4
int num_patches_height = grid_shape.second; // grid 1-4
- const size_t num_images = num_patches_width + num_patches_height + 1;
+ const size_t num_images = num_patches_width * num_patches_height + 1;
// TODO: size calculation is not calculated - it's only tens of MB
size_t ctx_size = 0;