Skip to content

Commit

Permalink
missing changes between audiogen and musicgen
Browse files Browse the repository at this point in the history
  • Loading branch information
adefossez committed Oct 26, 2023
1 parent 8b24e33 commit 7ea7bf7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions audiocraft/models/audiogen.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion config/model/lm/musicgen_lm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 7ea7bf7

Please sign in to comment.