From c4ec23824839b8f68a251258778c920e6ee7961a Mon Sep 17 00:00:00 2001 From: Phil Wang Date: Thu, 5 Oct 2023 10:22:50 -0700 Subject: [PATCH] fix unconditional --- setup.py | 2 +- voicebox_pytorch/voicebox_pytorch.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 06bb471..5f02c60 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ setup( name = 'voicebox-pytorch', packages = find_packages(exclude=[]), - version = '0.2.5', + version = '0.2.6', license='MIT', description = 'Voicebox - Pytorch', author = 'Phil Wang', diff --git a/voicebox_pytorch/voicebox_pytorch.py b/voicebox_pytorch/voicebox_pytorch.py index d944eda..45c8102 100644 --- a/voicebox_pytorch/voicebox_pytorch.py +++ b/voicebox_pytorch/voicebox_pytorch.py @@ -1080,7 +1080,8 @@ def __init__( self.text_to_semantic = text_to_semantic self.duration_predictor = duration_predictor - assert exists(text_to_semantic) ^ exists(duration_predictor), 'you should use either TextToSemantic from Spear-TTS, or DurationPredictor for the text / phoneme to audio alignment, but not both' + if self.condition_on_text: + assert exists(text_to_semantic) ^ exists(duration_predictor), 'you should use either TextToSemantic from Spear-TTS, or DurationPredictor for the text / phoneme to audio alignment, but not both' self.cond_drop_prob = cond_drop_prob