Skip to content

Commit 2ebb9d1

Browse files
committed
quick fix for guillaume at lyft
1 parent ecc8c71 commit 2ebb9d1

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "vector-quantize-pytorch"
3-
version = "1.22.2"
3+
version = "1.22.3"
44
description = "Vector Quantization - Pytorch"
55
authors = [
66
{ name = "Phil Wang", email = "lucidrains@gmail.com" }

vector_quantize_pytorch/residual_vq.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ def forward(
8585
):
8686
one_headed = codes.ndim == 2
8787

88+
condition, _ = pack([condition], 'b * d') # handle condition with ndim 2 - (batch, dim)
89+
8890
if one_headed:
8991
codes = rearrange(codes, 'c d -> 1 c d')
9092

0 commit comments

Comments
 (0)