Skip to content

Commit

Permalink
Update clip.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
ua741 committed Oct 25, 2023
1 parent eca23db commit 2262bb3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1367,7 +1367,7 @@ bool clip_compare_text_and_image(const clip_ctx * ctx, const int n_threads, cons
}

// prepare image and text vectors
const int projection_dim = ctx->vision_model.hparams.projection_dim;
int projection_dim = ctx->vision_model.hparams.projection_dim;
float img_vec[projection_dim];
float txt_vec[projection_dim];

Expand Down Expand Up @@ -1459,7 +1459,7 @@ bool clip_zero_shot_label_image(struct clip_ctx * ctx, const int n_threads, cons
// load the image
clip_image_f32 img_res;

int vec_dim = clip_get_vision_hparams(ctx)->projection_dim;
const int vec_dim = clip_get_vision_hparams(ctx)->projection_dim;

clip_image_preprocess(ctx, input_img, &img_res);

Expand Down

0 comments on commit 2262bb3

Please sign in to comment.