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 @@ -160,13 +160,13 @@ enum patch_merge_type {
160160};
161161
162162struct clip_hparams {
163- int32_t image_size;
164- int32_t patch_size;
165- int32_t n_embd;
166- int32_t n_ff;
167- int32_t projection_dim;
168- int32_t n_head;
169- int32_t n_layer;
163+ int32_t image_size = 0 ;
164+ int32_t patch_size = 0 ;
165+ int32_t n_embd = 0 ;
166+ int32_t n_ff = 0 ;
167+ int32_t projection_dim = 0 ;
168+ int32_t n_head = 0 ;
169+ int32_t n_layer = 0 ;
170170 // idefics3
171171 int32_t image_longest_edge = 0 ;
172172 int32_t image_min_pixels = -1 ;
@@ -2683,6 +2683,9 @@ struct clip_model_loader {
26832683 }
26842684 } else if (is_audio) {
26852685 get_u32 (KEY_A_NUM_MEL_BINS, hparams.n_mel_bins );
2686+ // some hparams are unused, but still need to set to avoid issues
2687+ hparams.image_size = 0 ;
2688+ hparams.patch_size = 1 ;
26862689
26872690 } else {
26882691 GGML_ASSERT (false && " unknown modality" );
You can’t perform that action at this time.
0 commit comments