PaddlePaddle / PaddlePaddle/FastDeploy

PaddleOCR-VL serving crashes with shape mismatch

Open
#6,075 1 comment 0 reactions 1 assignee View on GitHub

@TBD1 is already working on this.

Since Jan 16, 2026.

Dominant language
Python
Stars
3.7k
Forks
756
Avg merge
19h 28m
Merged PRs (30d)
4

Description

Bug Description

When serving a PaddleOCR-VL model using the FastDeploy framework, the worker process crashes with a shape mismatch error during inference. The error occurs inside fastdeploy/model_executor/models/paddleocr_vl/paddleocr_vl.py when assigning image_features to input_embeddings using image_mask.
Is there a known issue with image_mask / image token length handling in paddleocr_vl.py?

Environment

paddlepaddle-gpu 3.2.1
fastdeploy-gpu 2.3.3

Error Message
Non compatible API. Please refer to https://www.paddlepaddle.org.cn/documentation/docs/en/develop/guides/model_convert/convert_from_pytorch/api_difference/torch/torch.split.html first.
warnings.warn(

Traceback (most recent call last):
  File ".../fastdeploy/worker/worker_process.py", line 868, in <module>
    run_worker_proc()
  ...
  File ".../fastdeploy/model_executor/models/paddleocr_vl/paddleocr_vl.py", line 251, in get_input_embeddings
    input_embeddings[image_mask] = image_features.cast(self._dtype)
ValueError: (InvalidArgument) shape mismatch: value tensor of shape [5532, 1024] cannot be broadcast to indexing result of shape [1, 1024].
[Hint: Expected phi::funcs::CheckIsDimsMatchBool(...) == true, but received false]

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.