mirror of
https://github.com/huggingface/candle.git
synced 2025-06-16 10:38:54 +00:00
Fix for parler-tts, do not add the last slice of padding tokens. (#2442)
* Fix for parler-tts, do not add the last slice of padding tokens. * Support for the mini model.
This commit is contained in:
@ -429,7 +429,6 @@ impl Model {
|
||||
let min_len = all_audio_tokens.iter().map(|v| v.len()).min().unwrap_or(0);
|
||||
all_audio_tokens.iter_mut().for_each(|v| {
|
||||
v.resize(min_len, 0);
|
||||
v.push(self.pad_token_id)
|
||||
});
|
||||
let all_audio_tokens = Tensor::new(all_audio_tokens, &candle::Device::Cpu)?;
|
||||
Ok(all_audio_tokens)
|
||||
|
Reference in New Issue
Block a user