Skip to content

Commit

Permalink
Update clip.cpp
Browse files Browse the repository at this point in the history
bugfix for new conversions
  • Loading branch information
cmp-nct authored Jan 24, 2024
1 parent 0dbd295 commit fccab82
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions examples/llava/clip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -846,10 +846,11 @@ struct clip_ctx * clip_model_load(const char * fname, const int verbosity = 1) {
new_clip->proj_type = clip_projector_type_from_string(proj_type);
}
else {
new_clip->proj_type = PROJECTOR_TYPE_MLP;
}
if (new_clip->proj_type == PROJECTOR_TYPE_MLP) {
if (gguf_find_tensor(ctx, format(TN_LLAVA_PROJ, 3, "weight").c_str()) != -1) {
new_clip->proj_type = PROJECTOR_TYPE_MLP_NORM;
} else {
new_clip->proj_type = PROJECTOR_TYPE_MLP;
}
}
}
Expand Down

0 comments on commit fccab82

Please sign in to comment.