Skip to content

Commit b6f7e74

Browse files
revert
1 parent 38523c3 commit b6f7e74

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

optimum/intel/openvino/modeling_visual_language.py

+3
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,9 @@ def prepare_inputs(
166166
if past_len:
167167
position_ids = position_ids[:, -inputs_embeds.shape[1] :]
168168

169+
if self.config.model_type == "qwen2_vl" and position_ids.ndim != 3:
170+
position_ids = np.repeat(np.expand_dims(position_ids, 0), 3, axis=0)
171+
169172
inputs["position_ids"] = position_ids
170173

171174
if "beam_idx" in self.input_names:

0 commit comments

Comments
 (0)