Update modeling_moss_audio_tokenizer.py
Browse files
modeling_moss_audio_tokenizer.py
CHANGED
|
@@ -941,7 +941,7 @@ class MossAudioTokenizerPatchedPretransform(nn.Module):
|
|
| 941 |
x = x.reshape(b, d, -1, h).permute(0, 1, 3, 2).reshape(b, d * h, -1)
|
| 942 |
# We pad the input waveform to a multiple of `downsample_rate` before applying the encoder.
|
| 943 |
# Use a ceil division to match that padding and avoid dropping the last (partially padded) frame.
|
| 944 |
-
output_lengths =
|
| 945 |
return x, output_lengths
|
| 946 |
|
| 947 |
def decode(self, x, input_lengths):
|
|
|
|
| 941 |
x = x.reshape(b, d, -1, h).permute(0, 1, 3, 2).reshape(b, d * h, -1)
|
| 942 |
# We pad the input waveform to a multiple of `downsample_rate` before applying the encoder.
|
| 943 |
# Use a ceil division to match that padding and avoid dropping the last (partially padded) frame.
|
| 944 |
+
output_lengths = input_lengths // self.patch_size
|
| 945 |
return x, output_lengths
|
| 946 |
|
| 947 |
def decode(self, x, input_lengths):
|