Skip to content

Commit

Permalink
fix number of codebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
PABannier committed Oct 22, 2023
1 parent c04dcd9 commit 080b77f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions encodec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1159,6 +1159,7 @@ struct encodec_context * encodec_load_model(const std::string & model_path) {
}

ectx->model.hparams.n_q = get_num_codebooks(bandwidth, hop_length, sr);
fprintf(stderr, "%s: n_q = %d\n", __func__, ectx->model.hparams.n_q);

ectx->t_load_us = ggml_time_us() - t_start_load_us;

Expand Down
2 changes: 1 addition & 1 deletion encodec.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ struct encodec_hparams {
int32_t bandwidth = 24;

// The number of codebooks.
int32_t n_q;
int32_t n_q = 32;

int32_t ftype;
};
Expand Down

0 comments on commit 080b77f

Please sign in to comment.