Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def blip_captioning_dataset(
captions = []
print(f"Input captioning text: {text}")
for image in tqdm(images):
inputs = processor(image, text=text, return_tensors="pt").to("cuda")
inputs = processor(image, text=text, return_tensors="pt").to(device)
out = model.generate(
**inputs, max_length=150, do_sample=True, top_k=50, temperature=0.7
)
Expand Down