Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyasMoutawwakil committed Jan 6, 2025
1 parent 38523c3 commit b6f7e74
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions optimum/intel/openvino/modeling_visual_language.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@ def prepare_inputs(
if past_len:
position_ids = position_ids[:, -inputs_embeds.shape[1] :]

if self.config.model_type == "qwen2_vl" and position_ids.ndim != 3:
position_ids = np.repeat(np.expand_dims(position_ids, 0), 3, axis=0)

inputs["position_ids"] = position_ids

if "beam_idx" in self.input_names:
Expand Down

0 comments on commit b6f7e74

Please sign in to comment.