descript-audio-codec icon indicating copy to clipboard operation
descript-audio-codec copied to clipboard

Can't set n_quantizers for encode()

Open lonce opened this issue 2 years ago • 2 comments

It appears that DAC.encode() always uses 9 codebooks, ignoring the n_quantizer argument. The z and code index vectors returned are always the same (see screen capture below).

NumQuantizers

Thank you,

  • lonce

lonce avatar Sep 09 '23 11:09 lonce

I can set n_quatizers for the 16kHz model and get expected tensor sizes for codes and different z vectors, so this seems to be an issue only for the 44kHz model.

lonce avatar Sep 10 '23 14:09 lonce

you need to set model to eval state, model.eval()

HaiFengZeng avatar Feb 06 '24 09:02 HaiFengZeng