Skip to content

Commit 531d694

Browse files
Update optimum/intel/openvino/modeling_visual_language.py
Co-authored-by: Nikita Savelyev <[email protected]>
1 parent 4aff6ed commit 531d694

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

optimum/intel/openvino/modeling_visual_language.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1942,11 +1942,7 @@ def get_vision_embeddings(self, pixel_values, input_ids=None, temporal_ids=None,
19421942
if input_ids is not None and input_ids.shape[1] == 1:
19431943
return None
19441944

1945-
all_temporal_ids = None
1946-
if temporal_ids is not None:
1947-
all_temporal_ids = []
1948-
for t in temporal_ids:
1949-
all_temporal_ids.extend(t)
1945+
all_temporal_ids = [t for seq_t in temporal_ids for t in seq_t] if temporal_ids is not None else None
19501946

19511947
tgt_sizes = kwargs["tgt_sizes"]
19521948
pixel_values_list = pixel_values

0 commit comments

Comments
 (0)