Fix deep seek ocr2 image processing (#27884)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
github-actions[bot]
parent
a2aa51c818
commit
9371062ef3
@@ -125,6 +125,13 @@ def create_mm_data_row(
|
||||
medias=medias,
|
||||
return_tensors="pt",
|
||||
)["input_ids"].numel()
|
||||
elif type(processor).__name__ == "DeepseekVLV2Processor":
|
||||
result = processor(
|
||||
conversations=prompt_str,
|
||||
images=images,
|
||||
inference_mode=True,
|
||||
)
|
||||
prompt_len = result.input_ids.numel()
|
||||
else:
|
||||
prompt_len = processor(
|
||||
text=[prompt_str],
|
||||
|
||||
Reference in New Issue
Block a user