File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -182,13 +182,13 @@ enum patch_merge_type {
182182};
183183
184184struct clip_hparams {
185- int32_t image_size;
186- int32_t patch_size;
187- int32_t n_embd;
188- int32_t n_ff;
189- int32_t projection_dim;
190- int32_t n_head;
191- int32_t n_layer;
185+ int32_t image_size = 0 ;
186+ int32_t patch_size = 0 ;
187+ int32_t n_embd = 0 ;
188+ int32_t n_ff = 0 ;
189+ int32_t projection_dim = 0 ;
190+ int32_t n_head = 0 ;
191+ int32_t n_layer = 0 ;
192192 // idefics3
193193 int32_t image_longest_edge = 0 ;
194194 int32_t image_min_pixels = -1 ;
@@ -2728,6 +2728,9 @@ struct clip_model_loader {
27282728 }
27292729 } else if (is_audio) {
27302730 get_u32 (KEY_A_NUM_MEL_BINS, hparams.n_mel_bins );
2731+ // some hparams are unused, but still need to set to avoid issues
2732+ hparams.image_size = 0 ;
2733+ hparams.patch_size = 1 ;
27312734
27322735 } else {
27332736 GGML_ASSERT (false && " unknown modality" );
You can’t perform that action at this time.
0 commit comments