Skip to content

Commit

Permalink
allow for grouped residual LFQ
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidrains committed Oct 23, 2023
1 parent c748fcd commit 29a57ef
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions audiolm_pytorch/soundstream.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

from vector_quantize_pytorch import (
GroupedResidualVQ,
ResidualLFQ
GroupedResidualLFQ
)

from local_attention import LocalMHA
Expand Down Expand Up @@ -518,12 +518,11 @@ def __init__(
self.rq_groups = rq_groups

if use_lookup_free_quantizer:
assert rq_groups == 1, 'grouped residual LFQ not implemented yet'

self.rq = ResidualLFQ(
self.rq = GroupedResidualLFQ(
dim = codebook_dim,
num_quantizers = rq_num_quantizers,
codebook_size = codebook_size,
groups = rq_groups,
quantize_dropout = True,
quantize_dropout_cutoff_index = quantize_dropout_cutoff_index,
**rq_kwargs
Expand Down
2 changes: 1 addition & 1 deletion audiolm_pytorch/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '1.6.0'
__version__ = '1.6.1'
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
'torchaudio',
'transformers',
'tqdm',
'vector-quantize-pytorch>=1.10.2'
'vector-quantize-pytorch>=1.10.4'
],
classifiers=[
'Development Status :: 4 - Beta',
Expand Down

0 comments on commit 29a57ef

Please sign in to comment.