Skip to content

Commit

Permalink
continuation with absolute duration
Browse files Browse the repository at this point in the history
  • Loading branch information
sakemin committed Oct 18, 2023
1 parent 67a5c92 commit b26dac8
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,15 +355,7 @@ def predict(
audio_chords_duration = audio_chords_wavform.shape[-1] / sr

if continuation:
if (
duration + audio_chords_duration
> model.lm.cfg.dataset.segment_duration
):
raise ValueError(
"duration + continuation duration must be <= 30 seconds"
)

set_generation_params(duration + audio_chords_duration)
set_generation_params(duration)

if text_chords is None or text_chords == '': # Case 6
wav, tokens = model.generate_continuation(
Expand Down

0 comments on commit b26dac8

Please sign in to comment.