vector-quantize-pytorch 1.20.3__tar.gz → 1.20.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {vector_quantize_pytorch-1.20.3 → vector_quantize_pytorch-1.20.4}/PKG-INFO +1 -1
- {vector_quantize_pytorch-1.20.3 → vector_quantize_pytorch-1.20.4}/pyproject.toml +1 -1
- {vector_quantize_pytorch-1.20.3 → vector_quantize_pytorch-1.20.4}/vector_quantize_pytorch/sim_vq.py +4 -3
- {vector_quantize_pytorch-1.20.3 → vector_quantize_pytorch-1.20.4}/.github/workflows/build.yml +0 -0
- {vector_quantize_pytorch-1.20.3 → vector_quantize_pytorch-1.20.4}/.github/workflows/python-publish.yml +0 -0
- {vector_quantize_pytorch-1.20.3 → vector_quantize_pytorch-1.20.4}/.github/workflows/test.yml +0 -0
- {vector_quantize_pytorch-1.20.3 → vector_quantize_pytorch-1.20.4}/.gitignore +0 -0
- {vector_quantize_pytorch-1.20.3 → vector_quantize_pytorch-1.20.4}/LICENSE +0 -0
- {vector_quantize_pytorch-1.20.3 → vector_quantize_pytorch-1.20.4}/README.md +0 -0
- {vector_quantize_pytorch-1.20.3 → vector_quantize_pytorch-1.20.4}/examples/autoencoder.py +0 -0
- {vector_quantize_pytorch-1.20.3 → vector_quantize_pytorch-1.20.4}/examples/autoencoder_fsq.py +0 -0
- {vector_quantize_pytorch-1.20.3 → vector_quantize_pytorch-1.20.4}/examples/autoencoder_lfq.py +0 -0
- {vector_quantize_pytorch-1.20.3 → vector_quantize_pytorch-1.20.4}/examples/autoencoder_sim_vq.py +0 -0
- {vector_quantize_pytorch-1.20.3 → vector_quantize_pytorch-1.20.4}/images/fsq.png +0 -0
- {vector_quantize_pytorch-1.20.3 → vector_quantize_pytorch-1.20.4}/images/lfq.png +0 -0
- {vector_quantize_pytorch-1.20.3 → vector_quantize_pytorch-1.20.4}/images/vq.png +0 -0
- {vector_quantize_pytorch-1.20.3 → vector_quantize_pytorch-1.20.4}/ruff.toml +0 -0
- {vector_quantize_pytorch-1.20.3 → vector_quantize_pytorch-1.20.4}/tests/test_latent_quantization.py +0 -0
- {vector_quantize_pytorch-1.20.3 → vector_quantize_pytorch-1.20.4}/tests/test_readme.py +0 -0
- {vector_quantize_pytorch-1.20.3 → vector_quantize_pytorch-1.20.4}/vector_quantize_pytorch/__init__.py +0 -0
- {vector_quantize_pytorch-1.20.3 → vector_quantize_pytorch-1.20.4}/vector_quantize_pytorch/finite_scalar_quantization.py +0 -0
- {vector_quantize_pytorch-1.20.3 → vector_quantize_pytorch-1.20.4}/vector_quantize_pytorch/latent_quantization.py +0 -0
- {vector_quantize_pytorch-1.20.3 → vector_quantize_pytorch-1.20.4}/vector_quantize_pytorch/lookup_free_quantization.py +0 -0
- {vector_quantize_pytorch-1.20.3 → vector_quantize_pytorch-1.20.4}/vector_quantize_pytorch/random_projection_quantizer.py +0 -0
- {vector_quantize_pytorch-1.20.3 → vector_quantize_pytorch-1.20.4}/vector_quantize_pytorch/residual_fsq.py +0 -0
- {vector_quantize_pytorch-1.20.3 → vector_quantize_pytorch-1.20.4}/vector_quantize_pytorch/residual_lfq.py +0 -0
- {vector_quantize_pytorch-1.20.3 → vector_quantize_pytorch-1.20.4}/vector_quantize_pytorch/residual_vq.py +0 -0
- {vector_quantize_pytorch-1.20.3 → vector_quantize_pytorch-1.20.4}/vector_quantize_pytorch/utils.py +0 -0
- {vector_quantize_pytorch-1.20.3 → vector_quantize_pytorch-1.20.4}/vector_quantize_pytorch/vector_quantize_pytorch.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: vector-quantize-pytorch
|
|
3
|
-
Version: 1.20.
|
|
3
|
+
Version: 1.20.4
|
|
4
4
|
Summary: Vector Quantization - Pytorch
|
|
5
5
|
Project-URL: Homepage, https://pypi.org/project/vector-quantize-pytorch/
|
|
6
6
|
Project-URL: Repository, https://github.com/lucidrains/vector-quantizer-pytorch
|
{vector_quantize_pytorch-1.20.3 → vector_quantize_pytorch-1.20.4}/vector_quantize_pytorch/sim_vq.py
RENAMED
|
@@ -56,7 +56,7 @@ class SimVQ(Module):
|
|
|
56
56
|
if not exists(codebook_transform):
|
|
57
57
|
codebook_transform = nn.Linear(dim, dim, bias = False)
|
|
58
58
|
|
|
59
|
-
self.
|
|
59
|
+
self.code_transform = codebook_transform
|
|
60
60
|
|
|
61
61
|
self.register_buffer('frozen_codebook', codebook)
|
|
62
62
|
|
|
@@ -72,7 +72,7 @@ class SimVQ(Module):
|
|
|
72
72
|
|
|
73
73
|
@property
|
|
74
74
|
def codebook(self):
|
|
75
|
-
return self.
|
|
75
|
+
return self.code_transform(self.frozen_codebook)
|
|
76
76
|
|
|
77
77
|
def indices_to_codes(
|
|
78
78
|
self,
|
|
@@ -80,7 +80,8 @@ class SimVQ(Module):
|
|
|
80
80
|
):
|
|
81
81
|
implicit_codebook = self.codebook
|
|
82
82
|
|
|
83
|
-
|
|
83
|
+
frozen_codes = get_at('[c] d, b ... -> b ... d', self.frozen_codebook, indices)
|
|
84
|
+
quantized = self.code_transform(frozen_codes)
|
|
84
85
|
|
|
85
86
|
if self.accept_image_fmap:
|
|
86
87
|
quantized = rearrange(quantized, 'b ... d -> b d ...')
|
{vector_quantize_pytorch-1.20.3 → vector_quantize_pytorch-1.20.4}/.github/workflows/build.yml
RENAMED
|
File without changes
|
|
File without changes
|
{vector_quantize_pytorch-1.20.3 → vector_quantize_pytorch-1.20.4}/.github/workflows/test.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{vector_quantize_pytorch-1.20.3 → vector_quantize_pytorch-1.20.4}/examples/autoencoder_fsq.py
RENAMED
|
File without changes
|
{vector_quantize_pytorch-1.20.3 → vector_quantize_pytorch-1.20.4}/examples/autoencoder_lfq.py
RENAMED
|
File without changes
|
{vector_quantize_pytorch-1.20.3 → vector_quantize_pytorch-1.20.4}/examples/autoencoder_sim_vq.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{vector_quantize_pytorch-1.20.3 → vector_quantize_pytorch-1.20.4}/tests/test_latent_quantization.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{vector_quantize_pytorch-1.20.3 → vector_quantize_pytorch-1.20.4}/vector_quantize_pytorch/utils.py
RENAMED
|
File without changes
|
|
File without changes
|