[Bugfix] Fix Phi-3v crash when input images are of certain sizes (#7840)

This commit is contained in:
zifeitong
2024-08-24 18:16:24 -07:00
committed by GitHub
parent aab0fcdb63
commit 80162c44b1
2 changed files with 22 additions and 7 deletions
-2
View File
@@ -400,8 +400,6 @@ def input_processor_for_phi3v(ctx: InputContext, llm_inputs: LLMInputs):
image_data = multi_modal_data["image"]
if isinstance(image_data, Image.Image):
w, h = image_data.size
w, h = _calc_hd_transform_size(width=w, height=h)
image_feature_size = get_phi3v_image_feature_size(hf_config,
input_width=w,
input_height=h)