[Model][PersonaPlex] Encode only consumed Mimi codebooks (#7399)
Signed-off-by: luozijian <luozijian0924@gmail.com>
This commit is contained in:
1 parent
79562e97ad
commit
ae430dddc0
4 files changed
+219
-2
No files matched your search
@@ -421,7 +421,7 @@ class PersonaPlexMimiCodec(nn.Module):
|
||||
x = self._run_stages(x, self._enc_stages, active)
|
||||
x = self.encoder_transformer.step(x.transpose(1, 2), active).transpose(1, 2)
|
||||
x = self._downsample(x, active)
|
||||
codes = self.model.quantizer.encode(x) # [Q, B, T]
|
||||
codes = self.model.quantizer.encode(x, num_quantizers=CODEBOOKS) # [Q, B, T]
|
||||
return codes[:CODEBOOKS, :, 0].transpose(0, 1).contiguous()
|
||||
|
||||
@torch.no_grad()
|
||||
|
||||
Reference in new issue
Block a user