From 7b19171b7bef7e03e47e23e654157abb5d2e4b74 Mon Sep 17 00:00:00 2001 From: Marcin Ostrowski Date: Thu, 30 Jan 2025 01:57:42 +0100 Subject: [PATCH] Cast inputs type to dictionary. --- torchbenchmark/models/hf_clip/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/torchbenchmark/models/hf_clip/__init__.py b/torchbenchmark/models/hf_clip/__init__.py index f2920eef68..33e8bfd809 100644 --- a/torchbenchmark/models/hf_clip/__init__.py +++ b/torchbenchmark/models/hf_clip/__init__.py @@ -51,9 +51,9 @@ def __init__(self, test, device, batch_size=1, extra_args=[]): text = "the dog is here" images = [image] * self.batch_size texts = [text] * self.batch_size - self.inputs = processor( + self.inputs = dict(processor( text=texts, images=images, return_tensors="pt", padding=True - ) + )) # dict_keys(['input_ids', 'attention_mask', 'pixel_values']) for key in self.inputs: