Skip to content

Commit

Permalink
potential fix for an issue in generate, identified by @Jiang-Stan #28
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidrains committed Feb 4, 2024
1 parent 4fe623e commit 264a1f2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ They basically applied <a href="https://arxiv.org/abs/2202.04200">MaskGiT</a> to

- <a href="https://github.com/lucasnewman">Lucas Newman</a> for basically training a small working Soundstorm with models across multiple repositories, showing it all works end-to-end. Models include <a href="https://github.com/lucidrains/audiolm-pytorch">SoundStream</a>, <a href="https://github.com/lucidrains/spear-tts-pytorch">Text-to-Semantic T5</a>, and finally the SoundStorm transformer here.

- <a href="https://github.com/Jiang-Stan">@Jiang-Stan</a> for identifying a critical bug in the iterative demasking!

## Install

```bash
Expand Down
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.4.0',
version = '0.4.1',
license='MIT',
description = 'SoundStorm - Efficient Parallel Audio Generation from Google Deepmind, in Pytorch',
author = 'Phil Wang',
Expand Down
2 changes: 1 addition & 1 deletion soundstorm_pytorch/soundstorm.py
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,7 @@ def generate(
if not self.can_mask_prev_unmasked:
scores = scores.masked_fill(~mask, mask_value)

scores_sorted = scores.argsort(dim = -1, descending = True)
scores_sorted = scores.argsort(dim = -1, descending = True).argsort(dim = -1)

mask_num_tokens = rearrange(mask_num_tokens, 'b -> b 1')

Expand Down

0 comments on commit 264a1f2

Please sign in to comment.