Skip to content

Commit e452ca1

Browse files
committed
oops
1 parent 9418be8 commit e452ca1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
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 = "transfusion-pytorch"
3-
version = "0.0.18"
3+
version = "0.0.20"
44
description = "Transfusion in Pytorch"
55
authors = [
66
{ name = "Phil Wang", email = "lucidrains@gmail.com" }

transfusion_pytorch/transfusion.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,7 @@ def forward(
659659
batch_modality_tokens.append(modality_tensor)
660660
batch_modality_positions.append((modality_type, offset + 1, length)) # offset + 1 due to extra [som] token
661661

662-
offset += length
662+
offset += length + 2 # +2 due to [som] and [eom]
663663

664664
text.append(torch.cat(batch_text))
665665
modality_tokens.append(batch_modality_tokens)

0 commit comments

Comments
 (0)