Update examples/llava/clip.cpp

This commit is contained in:
Xuan-Son Nguyen 2025-01-30 16:20:46 +01:00 committed by GitHub
parent 6108d4c78f
commit 5f13c244b3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1115,7 +1115,7 @@ static ggml_cgraph * clip_image_build_graph(clip_ctx * ctx, const clip_image_f32
}
// glm projector
else if (ctx->has_glm_projector) {
if (ctx->proj_type == PROJECTOR_TYPE_GLM_EDGE){
if (ctx->proj_type == PROJECTOR_TYPE_GLM_EDGE) {
size_t gridsz = (size_t)sqrt(embeddings->ne[1]);
embeddings = ggml_cont(ctx0, ggml_permute(ctx0,embeddings,1,0,2,3));
embeddings = ggml_reshape_3d(ctx0, embeddings, gridsz, gridsz, embeddings->ne[1]);