Skip to content

Commit bee5200

Browse files
committed
fix n_patches
1 parent 949d32f commit bee5200

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

examples/llava/clip.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2385,6 +2385,8 @@ int clip_n_patches_by_img(const struct clip_ctx * ctx, struct clip_image_f32 * i
23852385
n_patches = x_patch * y_patch;
23862386
} else if (ctx->proj_type == PROJECTOR_TYPE_GEMMA3) {
23872387
n_patches = 256;
2388+
} else if (ctx->proj_type == PROJECTOR_TYPE_IDEFICS3) {
2389+
n_patches /= (int)ctx->vision_model.hparams.proj_scale_factor;
23882390
}
23892391

23902392
return n_patches;

0 commit comments

Comments
 (0)