Skip to content
This repository was archived by the owner on Sep 10, 2025. It is now read-only.

Commit 21ffafe

Browse files
committed
dytpe set for input
1 parent 0ac5f50 commit 21ffafe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torchchat/generate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,7 @@ def chat(
755755

756756
transform = flamingo_transform(str(self.tokenizer_args.tokenizer_path))
757757

758-
with torch.device(device=self.builder_args.device):
758+
with torch.device(device=self.builder_args.device), set_default_dtype(self.dtype):
759759
data = transform({"messages": messages}, inference=True)
760760
batch = padded_collate_tiled_images_and_mask([data], pad_direction="left", pad_max_images=1)
761761
seq_len = len(data["tokens"])

0 commit comments

Comments
 (0)