fix vocoder train

This commit is contained in:
lyuxiang.lx
2025-03-07 16:39:13 +08:00
parent fcc054f64e
commit a69b7e275d
12 changed files with 108 additions and 17 deletions

View File

@@ -299,7 +299,8 @@ class CosyVoice2Model(CosyVoiceModel):
self.flow.half()
self.token_hop_len = self.flow.encoder.static_chunk_size
# flow decoder required_cache_size
self.flow_decoder_required_cache_size = self.flow.decoder.estimator.num_decoding_left_chunks * self.flow.decoder.estimator.static_chunk_size
# TODO 基模型训练时没有设置num_decoding_left_chunks需要重新训一下才能指定flow_decoder_required_cache_size
self.flow_decoder_required_cache_size = 999
# hift cache
self.mel_cache_len = 8
self.source_cache_len = int(self.mel_cache_len * 480)