Skip to content

Commit

Permalink
USE MAX_IMAGE_FEATURE_LAYERS const in layer calc
Browse files Browse the repository at this point in the history
Signed-off-by: Alex-Brooks <[email protected]>
  • Loading branch information
alex-jw-brooks committed Feb 12, 2025
1 parent e1d2d8f commit 8d0195f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/llava/clip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3001,7 +3001,7 @@ int get_deepest_feature_layer(const struct clip_ctx * ctx) {
}

// If we set explicit vision feature layers, only go up to the deepest one
for (int i = 0; i < 4; i++) {
for (int i = 0; i < MAX_IMAGE_FEATURE_LAYERS; i++) {
if (ctx->vision_model.hparams.vision_feature_layer[i] > deepest_feature_layer) {
deepest_feature_layer = ctx->vision_model.hparams.vision_feature_layer[i];
}
Expand Down

0 comments on commit 8d0195f

Please sign in to comment.