Skip to content

Commit bec9ef1

Browse files
authored
Apply suggestions from code review
1 parent 49c0863 commit bec9ef1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/llava/clip.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2445,7 +2445,7 @@ const char * clip_patch_merge_type(const struct clip_ctx * ctx) {
24452445
}
24462446

24472447
const int32_t * clip_image_grid(const struct clip_ctx * ctx) {
2448-
if(ctx->vision_model.hparams.image_grid_pinpoints.size()) {
2448+
if (ctx->vision_model.hparams.image_grid_pinpoints.size()) {
24492449
return &ctx->vision_model.hparams.image_grid_pinpoints.front();
24502450
}
24512451
return nullptr;
@@ -2992,12 +2992,12 @@ int get_deepest_feature_layer(const struct clip_ctx * ctx) {
29922992
}
29932993

29942994
// If we set explicit vision feature layers, only go up to the deepest one
2995-
for (const auto & feature_layer: hparams.vision_feature_layer) {
2995+
for (const auto & feature_layer : hparams.vision_feature_layer) {
29962996
if (feature_layer > deepest_feature_layer) {
29972997
deepest_feature_layer = feature_layer;
29982998
}
29992999
}
3000-
return deepest_feature_layer < 0 ? n_layer: deepest_feature_layer;
3000+
return deepest_feature_layer < 0 ? n_layer : deepest_feature_layer;
30013001
}
30023002

30033003
bool clip_encode_float_image (struct clip_ctx * ctx, int n_threads, float * img, int h, int w, float * vec) {

0 commit comments

Comments
 (0)