From 977371e8dacb166f122006021b162b74557d91e1 Mon Sep 17 00:00:00 2001 From: Phil Wang Date: Wed, 9 Aug 2023 08:21:00 -0700 Subject: [PATCH] make sure generate can still work unconditionally, fix readme --- setup.py | 2 +- soundstorm_pytorch/soundstorm.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 3b29bdc..414bd1d 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ setup( name = 'soundstorm-pytorch', packages = find_packages(exclude=[]), - version = '0.0.22', + version = '0.0.23', license='MIT', description = 'SoundStorm - Efficient Parallel Audio Generation from Google Deepmind, in Pytorch', author = 'Phil Wang', diff --git a/soundstorm_pytorch/soundstorm.py b/soundstorm_pytorch/soundstorm.py index f35de78..6bb4080 100644 --- a/soundstorm_pytorch/soundstorm.py +++ b/soundstorm_pytorch/soundstorm.py @@ -734,7 +734,7 @@ def generate( **kwargs ): - if not exists(cond_semantic_token_ids): + if self.should_condition and not exists(cond_semantic_token_ids): assert exists(texts) and exists(self.text_to_semantic) if is_bearable(texts, List[str]): @@ -883,7 +883,6 @@ def maybe_get_condition(self, token_ids = None, length = None): cond_tokens = cond_tokens.masked_fill(~rearrange(mask, '... -> ... 1'), 0.) - # now need to interpolate the conditioning tokens # to align semantic and vector quantized tokens, time-wise