From 7ea7bf7eb6210fb8393350181465bfec4605ea89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20D=C3=A9fossez?= Date: Thu, 26 Oct 2023 17:47:41 +0200 Subject: [PATCH] missing changes between audiogen and musicgen --- audiocraft/models/audiogen.py | 4 ++++ config/model/lm/musicgen_lm.yaml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/audiocraft/models/audiogen.py b/audiocraft/models/audiogen.py index 5cb88998..b4df536e 100644 --- a/audiocraft/models/audiogen.py +++ b/audiocraft/models/audiogen.py @@ -38,6 +38,10 @@ def __init__(self, name: str, compression_model: CompressionModel, lm: LMModel, self.name = name self.compression_model = compression_model self.lm = lm + # Just to be safe, let's put everything in eval mode. + self.compression_model.eval() + self.lm.eval() + if max_duration is None: if hasattr(lm, 'cfg'): max_duration = lm.cfg.dataset.segment_duration # type: ignore diff --git a/config/model/lm/musicgen_lm.yaml b/config/model/lm/musicgen_lm.yaml index 5bc87a62..be1fbc14 100644 --- a/config/model/lm/musicgen_lm.yaml +++ b/config/model/lm/musicgen_lm.yaml @@ -18,7 +18,7 @@ codebooks_pattern: delays: [0, 0, 0, 0] music_lm: group_by: 2 - valle: + coarse_first: delays: [0, 0, 0] transformer_lm: