diff --git a/examples/llava/clip.cpp b/examples/llava/clip.cpp index a883d8d80..2cbddfa75 100644 --- a/examples/llava/clip.cpp +++ b/examples/llava/clip.cpp @@ -1062,5 +1062,5 @@ int clip_n_pos(struct clip_ctx * ctx) { } size_t clip_embd_nbytes(struct clip_ctx * ctx) { - return clip_n_pos(ctx) * 4096 * sizeof(float); + return clip_n_pos(ctx) * ctx->vision_model.mm_2_b->ne[0] * sizeof(float); }