Unverified Commit 2c658b5a authored by Sanchit Gandhi's avatar Sanchit Gandhi Committed by GitHub
Browse files

[MusicGen] Fix audio channel attribute (#27440)

[MusicGen] Fix mono logit test
parent abd4cbd7
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment