Skip to content

Commit

Permalink
address #145
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidrains committed Jul 1, 2024
1 parent 1889d04 commit 1bce1c3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "vector-quantize-pytorch"
version = "1.14.44"
version = "1.14.45"
description = "Vector Quantization - Pytorch"
authors = [
{ name = "Phil Wang", email = "[email protected]" }
Expand Down
6 changes: 4 additions & 2 deletions vector_quantize_pytorch/lookup_free_quantization.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,8 @@ def forward(

assert x.shape[-1] == self.dim, f'expected dimension of {self.dim} but received {x.shape[-1]}'

x = self.project_in(x)
with autocast():
x = self.project_in(x)

# maybe soft clamp

Expand Down Expand Up @@ -382,7 +383,8 @@ def forward(

# project out to feature dimension if needed

x = self.project_out(x)
with autocast():
x = self.project_out(x)

# reconstitute image or video dimensions

Expand Down

0 comments on commit 1bce1c3

Please sign in to comment.