Skip to content

Commit

Permalink
make sure generate can still work unconditionally, fix readme
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidrains committed Aug 9, 2023
1 parent e7e7dc4 commit 977371e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
3 changes: 1 addition & 2 deletions soundstorm_pytorch/soundstorm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]):
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 977371e

Please sign in to comment.