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

Commit 9054165

Browse files
committed
Bump torchtune pin
1 parent 0bc64c2 commit 9054165

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

install/install_requirements.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ PYTORCH_NIGHTLY_VERSION=dev20240814
5353
VISION_NIGHTLY_VERSION=dev20240814
5454

5555
# Nightly version for torchtune
56-
TUNE_NIGHTLY_VERSION=dev20240910
56+
TUNE_NIGHTLY_VERSION=dev20240916
5757

5858

5959
# Uninstall triton, as nightly will depend on pytorch-triton, which is one and the same

torchchat/generate.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -727,22 +727,22 @@ def chat(
727727
if generator_args.image_prompts is not None:
728728
print("Image prompts", generator_args.image_prompts)
729729

730+
# Support for just the first image prompt for now
731+
images = [Image.open(generator_args.image_prompts[0])]
730732
messages = [
731733
Message(
732734
role="user",
733735
content=[
734-
{"type": "image"},
736+
{"type": "image", "content": images[0]},
735737
{"type": "text", "content": generator_args.prompt},
736738
],
737739
eot=True,
738740
),
739741
Message(role="assistant", content=""),
740742
]
741743

742-
images = [Image.open(generator_args.image_prompts[0])]
743744
transform = flamingo_transform(str(self.tokenizer_args.tokenizer_path))
744-
745-
data = transform({"images": images, "messages": messages}, inference=True)
745+
data = transform({"messages": messages}, inference=True)
746746
batch = padded_collate([data], self.builder_args.device)
747747
batch.pop("mask")
748748
encoded = batch["tokens"]

0 commit comments

Comments
 (0)