Skip to content

Commit

Permalink
fix preprocess_inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyasMoutawwakil committed Jan 31, 2025
1 parent f6d48b1 commit d2366a6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions optimum/intel/openvino/modeling_visual_language.py
Original file line number Diff line number Diff line change
Expand Up @@ -1020,6 +1020,10 @@ def preprocess_inputs(
prompt = "<image>\n" + text
else:
prompt = text

if hasattr(processor, "patch_size") and processor.patch_size is None:
processor.patch_size = config.vision_config.patch_size

inputs = processor(images=image, text=prompt, return_tensors="pt")
return inputs

Expand Down

0 comments on commit d2366a6

Please sign in to comment.