Skip to content

Commit 4ef3128

Browse files
committed
feat: Add clip_is_idefics3
Branch: gabe-l-hart/GraniteDocling Signed-off-by: Gabe Goodhart <[email protected]>
1 parent c2202d2 commit 4ef3128

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

tools/mtmd/clip.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4376,6 +4376,10 @@ bool clip_is_gemma3(const struct clip_ctx * ctx) {
43764376
return ctx->proj_type() == PROJECTOR_TYPE_GEMMA3;
43774377
}
43784378

4379+
bool clip_is_idefics3(const struct clip_ctx * ctx) {
4380+
return ctx->proj_type() == PROJECTOR_TYPE_IDEFICS3;
4381+
}
4382+
43794383
bool clip_has_vision_encoder(const struct clip_ctx * ctx) {
43804384
return ctx->model.modality == CLIP_MODALITY_VISION;
43814385
}

tools/mtmd/clip.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ bool clip_is_glm(const struct clip_ctx * ctx);
9595
bool clip_is_qwen2vl(const struct clip_ctx * ctx);
9696
bool clip_is_llava(const struct clip_ctx * ctx);
9797
bool clip_is_gemma3(const struct clip_ctx * ctx);
98+
bool clip_is_idefics3(const struct clip_ctx * ctx);
9899

99100
bool clip_encode_float_image (struct clip_ctx * ctx, int n_threads, float * img, int h, int w, float * vec);
100101

0 commit comments

Comments
 (0)