Skip to content

Commit 6cce98e

Browse files
committed
fix divide by zero error
1 parent 60a74bd commit 6cce98e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/mtmd/clip.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2706,9 +2706,9 @@ struct clip_model_loader {
27062706
get_u32(string_format(KEY_PROJ_DIM, prefix), hparams.projection_dim);
27072707
get_f32(string_format(KEY_LAYER_NORM_EPS, prefix), hparams.eps);
27082708

2709+
get_u32(KEY_PATCH_SIZE, hparams.patch_size,false);
27092710
if (is_vision) {
2710-
get_u32(KEY_IMAGE_SIZE, hparams.image_size);
2711-
get_u32(KEY_PATCH_SIZE, hparams.patch_size);
2711+
get_u32(KEY_IMAGE_SIZE, hparams.image_size);
27122712
get_u32(KEY_IMAGE_CROP_RESOLUTION, hparams.image_crop_resolution, false);
27132713
get_i32(KEY_MINICPMV_VERSION, hparams.minicpmv_version, false); // legacy
27142714
get_u32(KEY_MINICPMV_QUERY_NUM, hparams.minicpmv_query_num, false);

0 commit comments

Comments
 (0)