We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bf53137 commit 500db14Copy full SHA for 500db14
setup.py
@@ -3,7 +3,7 @@
3
setup(
4
name = 'vector_quantize_pytorch',
5
packages = find_packages(),
6
- version = '1.4.0',
+ version = '1.4.1',
7
license='MIT',
8
description = 'Vector Quantization - Pytorch',
9
long_description_content_type = 'text/markdown',
vector_quantize_pytorch/residual_vq.py
@@ -220,6 +220,10 @@ def __init__(
220
def codebooks(self):
221
return torch.stack(tuple(rvq.codebooks for rvq in self.rvqs))
222
223
+ def get_codes_from_indices(self, indices):
224
+ codes = tuple(rvq.get_codes_from_indices(chunk_indices) for rvq, chunk_indices in zip(self.rvqs, indices))
225
+ return torch.stack(codes)
226
+
227
def forward(
228
self,
229
x,
0 commit comments