mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-31 02:02:21 +06:00
[MusicGen] Fix audio channel attribute (#27440)
[MusicGen] Fix mono logit test
This commit is contained in:
parent
abd4cbd775
commit
2c658b5a42
@ -1869,7 +1869,7 @@ class MusicgenForConditionalGeneration(PreTrainedModel):
|
||||
"disabled by setting `chunk_length=None` in the audio encoder."
|
||||
)
|
||||
|
||||
if self.config.audio_channels == 2 and audio_codes.shape[2] == self.decoder.num_codebooks // 2:
|
||||
if self.config.decoder.audio_channels == 2 and audio_codes.shape[2] == self.decoder.num_codebooks // 2:
|
||||
# mono input through encodec that we convert to stereo
|
||||
audio_codes = audio_codes.repeat_interleave(2, dim=2)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user