Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
181 commits
Select commit Hold shift + click to select a range
b833bd1
Fix bugs (#4707)
Bobholamovic Nov 5, 2025
66a5de1
Fix bugs (#4708)
Bobholamovic Nov 5, 2025
b36298e
Fix bug (#4709)
Bobholamovic Nov 5, 2025
f254f0e
disable mkldnn by default for PP-DocLayoutV2 (#4717)
TingquanGao Nov 10, 2025
9bd28fd
[Feat] Support vLLM deployment on DCUs (#4710)
Bobholamovic Nov 10, 2025
acc2508
Bump FD version from 2.3.0rc0 to 2.3.0 (#4721)
Bobholamovic Nov 10, 2025
f1d81b3
fastspeech models (#4337)
supotato6 Nov 12, 2025
33d0205
Replace naive eager attention with SDPA (#4725)
Bobholamovic Nov 13, 2025
9c2a4a9
Refactor to support generic dynamic graph models (#4718)
Bobholamovic Nov 13, 2025
e4866f9
Fix naming error (#4738)
Bobholamovic Nov 18, 2025
341a0eb
fix: add support for numpy integer types in JSON serialization
hwb96 Jul 21, 2025
9fe4301
fix configs of fastspeech models
TingquanGao Nov 12, 2025
27aadef
rm invalid params from speech models config
TingquanGao Nov 12, 2025
00e2fb4
fastspeech fix
supotato6 Nov 17, 2025
ade606f
del print
supotato6 Nov 17, 2025
3d57a2c
[Feat]: Integrate PP-OCRv5_mobile_det and PP-OCRv5_server_det dynamic…
XingweiDeng Nov 20, 2025
947971e
HPI Supports paddle 3.2 (#4754)
Bobholamovic Nov 21, 2025
f1ef86e
Fix code style and deps (#4757)
Bobholamovic Nov 24, 2025
2e34821
update fd config (#4760)
zhang-prog Nov 24, 2025
bb2b7fc
Fix: Fixing of minor issues in PP-OCRv5_det dynamic graphs (#4752)
XingweiDeng Nov 28, 2025
366302c
[Metax] Support ocr in metax (#4782)
metax666 Dec 1, 2025
5dd3d97
Update trt config (#4797)
Bobholamovic Dec 3, 2025
4320c9e
feat: support saving image shape, page_count, and group_id; add ctrl …
changdazhou Dec 5, 2025
dfee0ad
[Feat] PP-StructureV3 and PaddleOCR-VL servers support new parameters…
Bobholamovic Dec 5, 2025
e9e3238
Fix issue of linear memory increase (#4808)
changdazhou Dec 5, 2025
ec73caa
[Feat] use official safetensors (#4786)
Bobholamovic Dec 5, 2025
b0c03ac
Remove nested safe_open (#4785)
Bobholamovic Dec 5, 2025
702ea43
Install fonts in HPS server image (#4792)
Bobholamovic Dec 5, 2025
d6358f7
[Feat] Update HPS server deps (#4790)
Bobholamovic Dec 5, 2025
2ca278f
[Iluvatar GPU] Enable bf16, fp16 and sdpa (#4803)
tianyuzhou668 Dec 5, 2025
2ef1fca
Remove manual installation of safetensors in HPS Dockerfile (#4809)
Bobholamovic Dec 5, 2025
035b0ec
Fix issue of linear memory increase (#4810)
changdazhou Dec 5, 2025
695aef1
update doc for new supported parameters (#4800)
changdazhou Dec 5, 2025
e824092
[Feat]: Add dynamic graph model RT-DETR-L (#4801)
liu-jiaxuan Dec 8, 2025
49e7d4c
[Fix]: Add TemporaryDeviceChanger for text_detection/predictor (#4777)
XingweiDeng Dec 8, 2025
8350c58
[Feat]: Add dynamic graph model pplcnet (#4791)
XingweiDeng Dec 8, 2025
961c436
[Fix]: PP-Chart2Table support loading safetensors (#4794)
XingweiDeng Dec 8, 2025
d4e51aa
bugfix for WeakMethod deepcopy (#4813)
changdazhou Dec 8, 2025
65436f7
Support devices other than gpu and cpu (#4814)
Bobholamovic Dec 8, 2025
c267213
Remove debugging env (#4816)
Bobholamovic Dec 9, 2025
2b61e79
support to bypass model source availablity check by PADDLE_PDX_DISABL…
TingquanGao Nov 25, 2025
117de3c
Develop fastspeech pipeline (#4479)
supotato6 Dec 9, 2025
a444704
Fix hang on loading safetensors model (#4818)
Bobholamovic Dec 9, 2025
a130bf8
Temporarily disable tensorrt backends for PP-OCR server det models (#…
Bobholamovic Dec 10, 2025
5703f61
update docker (#4827)
changdazhou Dec 10, 2025
c868624
[Fix] Refine Checks for SDPA Availability (#4820)
Bobholamovic Dec 11, 2025
6963c8e
[Feat]: Add UVDoc dynamic graph model (#4793)
XingweiDeng Dec 11, 2025
97c8893
add PP-DocLayoutV2.yaml (#4822)
TingquanGao Dec 11, 2025
dce02cd
[Fix] Code refactoring of five dynamic graph models (#4821)
XingweiDeng Dec 15, 2025
df0c939
fix handle_funcs_dict for PP-StructureV3 in to_markdown (#4843)
changdazhou Dec 16, 2025
4549c9c
add PaddleOCR-VL-0.9B module config (#4840)
changdazhou Dec 16, 2025
23fd2b1
[Metax] support pp_structure_v3 (#4846)
metax666 Dec 19, 2025
322d184
support to merge continuation tables and recognize title level (#4770)
SpongeBob0318 Dec 22, 2025
35a9ef7
Move pipeline benchmark doc (#4850)
Bobholamovic Dec 23, 2025
59d5e72
[Fix] Fix dynamic model code (#4853)
XingweiDeng Dec 23, 2025
1bb7d72
[Feat] GenAI client allows overriding model name (#4847)
Bobholamovic Dec 23, 2025
91637a5
Add code and docs
Bobholamovic Dec 24, 2025
aee69b5
Fix bugs
Bobholamovic Dec 24, 2025
8b8c84f
Fix bugs
Bobholamovic Dec 24, 2025
91fd351
Fix bugs
Bobholamovic Dec 24, 2025
807c501
Support specifying logId
Bobholamovic Dec 24, 2025
7d3e355
[Fix] four dynamic model to adapt benchmark (#4859)
XingweiDeng Dec 25, 2025
3536864
[Feat] Add dynamic graph model SLANeXt_wired and SLANeXt_wireless (#4…
liu-jiaxuan Dec 25, 2025
f2513f2
Fix docs
Bobholamovic Dec 25, 2025
17502ca
allow footer_image between two table
SpongeBob0318 Dec 23, 2025
b94265c
Merge branch 'feat/concat-markdown-api' of github.com:Bobholamovic/Pa…
Bobholamovic Dec 25, 2025
3ec1f56
remove mistakenly added line causing bug
TingquanGao Dec 25, 2025
1ccd48f
[Fix] fix dependency packages for RT-DETR-L (#4865)
liu-jiaxuan Dec 26, 2025
45ee524
[Feat] Add dynamic graph model PP-OCRv5_mobile_rec and PP-OCRv5_serve…
liu-jiaxuan Dec 26, 2025
dc952ba
[Fix] Fix onnxruntime and onnx_graphsurgeon version in HPS images (#4…
Bobholamovic Dec 26, 2025
26dcdde
[Fix] fix config.py (#4862)
XingweiDeng Dec 26, 2025
812062d
Set default fastdeploy server init parameters for iluvatar gpus (#4870)
Bobholamovic Dec 30, 2025
afd45f4
Initialize forms in PDF document (#4867)
315930399 Dec 30, 2025
0399d84
support PP-DocLayoutV3 and update PaddleOCR-VL
changdazhou Dec 30, 2025
bb45e9a
support use_ocr_for_image_block
changdazhou Dec 30, 2025
f78dd86
bugfix for concatenate_pages
changdazhou Dec 30, 2025
4df623e
fix key error in text_word_region when return_word_box is true but no…
arosasg Dec 31, 2025
8bfdea1
Allow overriding HuggingFace endpoint
reda-alaoui Dec 10, 2025
1e7c241
update env var in DISABLE_MODEL_SOURCE_CHECK warning
mishi321 Dec 14, 2025
73f358c
Correct logging for image size exceeding limits (#4878)
szepeviktor Jan 4, 2026
2621977
Update
Bobholamovic Jan 4, 2026
c1cc342
Merge remote-tracking branch 'official/develop' into feat/concat-mark…
Bobholamovic Jan 4, 2026
558f2b9
Fix and update
Bobholamovic Jan 4, 2026
ffd96da
Fix typo
Bobholamovic Jan 4, 2026
752dc8c
[Fix] Allow HPI for cyrillic_PP-OCRv5_mobile_rec on Paddle 3.11 CUDA …
alealexpro100 Jan 5, 2026
7f032e4
support set min/max pixels for different labels
changdazhou Jan 6, 2026
a2040ec
local model add min_pixels, max_pixels (#4881)
zhang-prog Jan 6, 2026
2012f1d
fix compile_title_pattern
changdazhou Jan 6, 2026
56cae14
[XPU] Add XPU CI Case (#4879)
plusNew001 Jan 7, 2026
1a5c559
change dt_polys to rec_polys
changdazhou Jan 7, 2026
0916ae8
min_pixels, max_pixels only for PaddleOCR-VL (#4888)
zhang-prog Jan 7, 2026
a414422
Fix packaging doc (#4890)
Bobholamovic Jan 8, 2026
624a310
Allow using in-tree vllm/sglang models (#4893)
Bobholamovic Jan 8, 2026
ee792eb
bugfix: class title level on one page
TingquanGao Dec 30, 2025
be5696b
bugfix for concatenate_pages
changdazhou Dec 30, 2025
b01185d
update spotting prompt
changdazhou Jan 9, 2026
34b3313
Support PaddleOCR-VL-1.5-0.9B
Bobholamovic Jan 12, 2026
b056cac
Add vertical text support to OCR word box calculation (#4877)
Vyz333 Jan 12, 2026
9e0fa33
disable save as image, html and xlsx for result of concatenate_pages
TingquanGao Jan 12, 2026
85fbe53
temporarily remove concatenate_pages of PP-StructureV3
TingquanGao Jan 12, 2026
e79b82e
disable pixels in spotting
changdazhou Jan 13, 2026
acf86d5
refactor concatenate_pages for serviceization
TingquanGao Jan 13, 2026
04b51fb
Merge branch 'tingquan-dev' into feat/concat-markdown-api
Bobholamovic Jan 14, 2026
bcab769
Accomodate new API
Bobholamovic Jan 14, 2026
302439d
bugfix
TingquanGao Jan 14, 2026
1297aa0
Merge branch 'tingquan-dev' into feat/concat-markdown-api
Bobholamovic Jan 14, 2026
a83815c
bugfix
TingquanGao Jan 14, 2026
38a84e6
Merge remote-tracking branch 'tingquan/develop' into feat/concat-mark…
Bobholamovic Jan 15, 2026
add8ad3
Update interface
Bobholamovic Jan 15, 2026
7036219
refactor concatenate_pages for serviceization (#4903)
TingquanGao Jan 15, 2026
f216e0d
merge develop
changdazhou Jan 15, 2026
2b6f058
Merge branch 'develop' into feat/concat-markdown-api
Bobholamovic Jan 15, 2026
8fcf23e
merge feat/concat-markdown-api
changdazhou Jan 15, 2026
633fa95
Update docs
Bobholamovic Jan 15, 2026
16beca6
Merge remote-tracking branch 'vlm/feat/concat-markdown-api' into doc_vl
changdazhou Jan 16, 2026
2771144
Fix KeyError: 'text_word_region' when return_word_box=True and no tex…
scyyh11 Jan 16, 2026
faf6342
Merge branch 'doc_vl' into feat/vl-0.9b
Bobholamovic Jan 16, 2026
52d2e19
bugfix: use_seal_recognition
changdazhou Jan 16, 2026
9888b63
Update model name
Bobholamovic Jan 16, 2026
971f1be
Merge branch 'doc_vl' into feat/vl-0.9b
Bobholamovic Jan 16, 2026
3a76d95
Update config
Bobholamovic Jan 16, 2026
101e767
bugfix for seal_recognition
changdazhou Jan 17, 2026
4a34ce1
support layout_shape_mode
changdazhou Jan 17, 2026
9a7179c
Update config
Bobholamovic Jan 19, 2026
b917d9f
Remove usePolygonPoints and add layoutShapeMode
Bobholamovic Jan 19, 2026
53bd258
Merge branch 'feat/vl-0.9b' into feat/concat-markdown-api
Bobholamovic Jan 19, 2026
5f2a0df
Fix PyInstaller packaging: .version file not found error (#4916)
scyyh11 Jan 19, 2026
9ae9ff9
Update concatenate pages interface
Bobholamovic Jan 19, 2026
d24de8a
Add some models to the whitelist (#4915)
1184319564 Jan 20, 2026
de006f0
Support multiple pipelines share a single serving app
Bobholamovic Jan 20, 2026
041794c
Refactor
Bobholamovic Jan 20, 2026
3b551dc
Merge remote-tracking branch 'upstream/develop' into doc_vl
changdazhou Jan 20, 2026
9582189
update concatenate_pages
changdazhou Jan 20, 2026
eebc5fb
bugfix for filiter_box
changdazhou Jan 20, 2026
6706375
only return seal_rec_text when use_layout_detection=false
changdazhou Jan 20, 2026
5f600b0
bugfix
changdazhou Jan 20, 2026
66c38c7
Update service for restructure_pages
Bobholamovic Jan 20, 2026
3192692
Fix pypdfium2 thread safety issues causing memory corruption (#4909)
scyyh11 Jan 20, 2026
9dc184c
Merge branch 'doc_vl' into feat/concat-markdown-api
Bobholamovic Jan 20, 2026
4895b35
Merge branch 'develop' into feat/concat-markdown-api
Bobholamovic Jan 20, 2026
7728312
bugfix
changdazhou Jan 20, 2026
dcfa2ab
Merge remote-tracking branch 'vlm/feat/concat-markdown-api' into doc_vl
changdazhou Jan 20, 2026
8918510
bugfix
changdazhou Jan 20, 2026
7729c88
Fix bug
Bobholamovic Jan 20, 2026
7a79baf
Merge branch 'doc_vl' of https://github.com/changdazhou/PaddleX into …
Bobholamovic Jan 20, 2026
ea3c14b
Update doc
Bobholamovic Jan 20, 2026
0c07360
bugfix for key_error doc_preprocessor_res
changdazhou Jan 21, 2026
cc66dda
Fix service
Bobholamovic Jan 21, 2026
3dc6904
Merge branch 'doc_vl' into feat/concat-markdown-api
Bobholamovic Jan 21, 2026
9c779ba
update restructure_pages process by object
changdazhou Jan 21, 2026
3d21036
update deps for ocr
changdazhou Jan 21, 2026
7b197f9
Merge branch 'doc_vl' into feat/concat-markdown-api
Bobholamovic Jan 22, 2026
f3d4a5b
Do not use original results
Bobholamovic Jan 22, 2026
f6a3b6a
Use md_data
Bobholamovic Jan 22, 2026
f7c54b5
bugfix for model_setting
changdazhou Jan 22, 2026
ff1cbc6
support input_path for doc_vlm
changdazhou Jan 22, 2026
04f941a
bugfix for title_level
changdazhou Jan 22, 2026
cde6962
bugfix for imgs_in_doc
changdazhou Jan 22, 2026
98ad4e3
bugfix for merge_table
changdazhou Jan 23, 2026
0557908
Do not use multi-threading
Bobholamovic Jan 23, 2026
ed77ce6
Fix memory leaks
changdazhou Jan 23, 2026
e06cc50
Fix memory leaks
changdazhou Jan 23, 2026
20df4b4
merge feat/concat-markdown-api
changdazhou Jan 25, 2026
ecced0b
bugfix for merge_table
changdazhou Jan 25, 2026
d841109
update layout_shape_mode=auto
changdazhou Jan 25, 2026
3d84020
support filter overlap boxes by score
changdazhou Jan 25, 2026
b7157b0
bugfix for imgs in table
changdazhou Jan 25, 2026
3141373
update config
changdazhou Jan 25, 2026
9ac529e
Install torch first
Bobholamovic Jan 26, 2026
fbbd845
bugfix for inline formula
changdazhou Jan 26, 2026
24dd09a
Merge branch 'doc_vl' into feat/concat-markdown-api
Bobholamovic Jan 26, 2026
fa0fa76
update layout_shape_mode=auto
changdazhou Jan 26, 2026
f5c0ed0
bugfix for filiter_box
changdazhou Jan 26, 2026
8ee2a65
Update 3060 doc
Bobholamovic Jan 26, 2026
7a0928a
Merge remote-tracking branch 'vlm/feat/concat-markdown-api' into doc_vl
changdazhou Jan 26, 2026
8074c69
show order and label
changdazhou Jan 26, 2026
f060b54
show order and label
changdazhou Jan 26, 2026
55b496d
bugfix for seal_recognition
changdazhou Jan 26, 2026
640333a
Fix table recognition v2 bug
Bobholamovic Jan 27, 2026
7a5f3b5
fix(ROCm): Delete conv2d fuse passes for ROCm compatibility
Jan 27, 2026
0782863
fix: Clean LaTeX delimiters from formula output
Jan 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
75 changes: 75 additions & 0 deletions .github/workflows/xpu_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: CI_XPU

on:
pull_request:
branches:
- develop
paths-ignore:
- '**.md'
- '**.txt'
workflow_dispatch:

concurrency:
group: ${{ github.event.pull_request.number }}-xpu-ci
cancel-in-progress: true

jobs:
CI_XPU:
timeout-minutes: 60
runs-on: [self-hosted, XPU-P800-2Card]
steps:
- name: Print current runner name
run: |
echo "Current runner name: ${{ runner.name }}"
# Because the system version is lower than 2.23, the checkout cannot be used.
# - name: Checkout code
# uses: actions/checkout@v4

- name: Code Checkout
env:
docker_image: ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlepaddle/fastdeploy-xpu:2.3.0
run: |
REPO="https://github.com/${{ github.repository }}.git"
FULL_REPO="${{ github.repository }}"
REPO_NAME="${FULL_REPO##*/}"
BASE_BRANCH="${{ github.base_ref }}"
# Clean the repository directory before starting
docker run --rm --net=host -v $(pwd):/workspace -w /workspace \
-e "REPO_NAME=${REPO_NAME}" \
-e "BASE_BRANCH=${BASE_BRANCH}" \
${docker_image} /bin/bash -c '
if [ -d ${REPO_NAME} ]; then
echo "Directory ${REPO_NAME} exists, removing it..."
rm -rf ${REPO_NAME}
fi
'
git config --global user.name "PaddleCI"
git config --global user.email "paddle_ci@example.com"
git clone ${REPO} ${REPO_NAME} -b ${BASE_BRANCH}
cd PaddleX
if [ "${{ github.event_name }}" = "pull_request" ]; then
git fetch origin pull/${{ github.event.pull_request.number }}/head:pr/${{ github.event.pull_request.number }}
git merge pr/${{ github.event.pull_request.number }}
git log -n 3 --oneline
else
git checkout ${{ github.sha }}
git log -n 3 --oneline
fi

- name: Run CI unittest
env:
docker_image: ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlepaddle/fastdeploy-xpu:2.3.0
run: |
runner_name="${{ runner.name }}"
PARENT_DIR=$(dirname "$WORKSPACE")
echo "PARENT_DIR:$PARENT_DIR"
docker run --rm --net=host --cap-add=SYS_PTRACE --privileged --shm-size=64G \
-v $(pwd):/workspace -w /workspace \
-e "http_proxy=$(git config --global --get http.proxy)" \
-e "https_proxy=$(git config --global --get https.proxy)" \
-e "no_proxy=bcebos.com,mirrors.tuna.tsinghua.edu.cn,127.0.0.1,localhost" \
${docker_image} /bin/bash -c "
git config --global --add safe.directory /workspace/PaddleX
cd PaddleX
bash tests/run_xpu_ci.sh
"
5 changes: 5 additions & 0 deletions .precommit/check_imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"GPUtil": "GPUtil",
"huggingface_hub": "huggingface-hub",
"imagesize": "imagesize",
"jieba": "jieba",
"jinja2": "Jinja2",
"joblib": "joblib",
"langchain": "langchain",
Expand All @@ -60,6 +61,7 @@
"modelscope": "modelscope",
"numpy": "numpy",
"openai": "openai",
"opencc": "OpenCC",
"cv2": "opencv-contrib-python",
"openpyxl": "openpyxl",
"packaging": "packaging",
Expand All @@ -73,11 +75,13 @@
"pycocotools": "pycocotools",
"pydantic": "pydantic",
"pypdfium2": "pypdfium2",
"pypinyin": "pypinyin",
"yaml": "PyYAML",
"regex": "regex",
"requests": "requests",
"ruamel.yaml": "ruamel.yaml",
"safetensors": "safetensors",
"scipy": "scipy",
"skimage": "scikit-image",
"sklearn": "scikit-learn",
"sentencepiece": "sentencepiece",
Expand Down Expand Up @@ -120,6 +124,7 @@
"paddle_custom_device",
"ultra_infer",
"fastdeploy",
"onnxruntime",
}


Expand Down
2 changes: 1 addition & 1 deletion api_examples/pipelines/test_pp_structure_v3.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
use_doc_orientation_classify=False,
use_doc_unwarping=False,
use_common_ocr=True,
use_seal_recognition=True,
use_seal_recognition=False,
use_table_recognition=True,
)

Expand Down
27 changes: 27 additions & 0 deletions api_examples/pipelines/test_text_to_speech.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from paddlex import create_pipeline

pipeline = create_pipeline(pipeline="text_to_speech")

output = pipeline.predict(
"根据您的情况,建议低盐饮食配合轻度活动,已为您推荐了健康的食谱"
)

for res in output:
print(res)
res.print()
res.save_to_audio("./output/test.wav")
res.save_to_json("./output")
7 changes: 5 additions & 2 deletions deploy/genai_vllm_server_docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,17 @@ ENV PIP_NO_CACHE_DIR=0
ENV PYTHONUNBUFFERED=1
ENV PYTHONDONTWRITEBYTECODE=1

RUN python -m pip install torch==2.8.0

ARG PADDLEX_VERSION=">=3.3.6,<3.4"
RUN python -m pip install "paddlex${PADDLEX_VERSION}"

ARG BUILD_FOR_SM120=false
RUN if [ "${BUILD_FOR_SM120}" = 'true' ]; then \
python -m pip install https://github.com/mjun0812/flash-attention-prebuild-wheels/releases/download/v0.3.14/flash_attn-2.8.3+cu128torch2.8-cp310-cp310-linux_x86_64.whl \
python -m pip install https://github.com/mjun0812/flash-attention-prebuild-wheels/releases/download/v0.4.11/flash_attn-2.8.3%2Bcu128torch2.8-cp310-cp310-linux_x86_64.whl; \
else \
python -m pip install https://github.com/mjun0812/flash-attention-prebuild-wheels/releases/download/v0.3.14/flash_attn-2.8.2+cu128torch2.8-cp310-cp310-linux_x86_64.whl \
python -m pip install https://github.com/mjun0812/flash-attention-prebuild-wheels/releases/download/v0.3.14/flash_attn-2.8.2+cu128torch2.8-cp310-cp310-linux_x86_64.whl; \
fi \
&& paddlex --install genai-vllm-server

EXPOSE 8080
Expand Down
4 changes: 2 additions & 2 deletions deploy/genai_vllm_server_docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ while [[ $# -gt 0 ]]; do
shift
;;
*)
echo "Unknown option: $1"
exit 1
echo "Unknown option: $1" >&2
exit 2
;;
esac
done
Expand Down
8 changes: 6 additions & 2 deletions deploy/hps/sdk/common/server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@ rm -rf "${MODEL_REPO_DIR}"
cp -r model_repo "${MODEL_REPO_DIR}"

find "${MODEL_REPO_DIR}" -mindepth 1 -maxdepth 1 -type d -print0 | while IFS= read -r -d '' dir_; do
if [ -f "${dir_}/config_${PADDLEX_HPS_DEVICE_TYPE}.pbtxt" ]; then
cp -f "${dir_}/config_${PADDLEX_HPS_DEVICE_TYPE}.pbtxt" "${dir_}/config.pbtxt"
if [ ! -f "${dir_}/config.pbtxt" ]; then
if [ "${PADDLEX_HPS_DEVICE_TYPE:-gpu}" = 'gpu' ]; then
cp -f "${dir_}/config_gpu.pbtxt" "${dir_}/config.pbtxt"
else
cp -f "${dir_}/config_cpu.pbtxt" "${dir_}/config.pbtxt"
fi
fi
done

Expand Down
1 change: 1 addition & 0 deletions deploy/hps/sdk/pipelines/3d_bev_detection/version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.1.1
32 changes: 22 additions & 10 deletions deploy/hps/sdk/pipelines/OCR/server/model_repo/ocr/1/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from paddlex_hps_server import (
BaseTritonPythonModel,
app_common,
logging,
protocol,
schemas,
utils,
Expand Down Expand Up @@ -167,10 +168,13 @@ def run_batch(self, inputs, log_ids, batch_id):

def _group_inputs(self, inputs):
def _to_hashable(obj):
if isinstance(obj, list):
return tuple(obj)
elif isinstance(obj, dict):
return tuple(sorted(obj.items()))
if isinstance(obj, dict):
return tuple(
(_to_hashable(k), _to_hashable(v))
for k, v in sorted(obj.items(), key=lambda x: repr(x[0]))
)
elif isinstance(obj, list):
return tuple(_to_hashable(x) for x in obj)
else:
return obj

Expand Down Expand Up @@ -231,12 +235,20 @@ def _preprocess(self, input, log_id):
else self.app_config.visualize
)

file_bytes = utils.get_raw_bytes(input.file)
images, data_info = utils.file_to_images(
file_bytes,
file_type,
max_num_imgs=self.context["max_num_input_imgs"],
)
try:
file_bytes = utils.get_raw_bytes(input.file)
images, data_info = utils.file_to_images(
file_bytes,
file_type,
max_num_imgs=self.context["max_num_input_imgs"],
)
except Exception as e:
logging.error("Failed to get input file bytes: %s", e)
return protocol.create_aistudio_output_without_result(
422,
"Input file is invalid",
log_id=log_id,
)

return images, data_info, visualize_enabled

Expand Down
1 change: 1 addition & 0 deletions deploy/hps/sdk/pipelines/OCR/version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.2.5
1 change: 1 addition & 0 deletions deploy/hps/sdk/pipelines/PP-ChatOCRv3-doc/version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.3.2
1 change: 1 addition & 0 deletions deploy/hps/sdk/pipelines/PP-ChatOCRv4-doc/version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.4.2
1 change: 1 addition & 0 deletions deploy/hps/sdk/pipelines/PP-DocTranslation/version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.1.2
1 change: 1 addition & 0 deletions deploy/hps/sdk/pipelines/PP-ShiTuV2/version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.1.1
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from paddlex_hps_server import (
BaseTritonPythonModel,
app_common,
logging,
protocol,
schemas,
utils,
Expand Down Expand Up @@ -163,6 +164,7 @@ def run_batch(self, inputs, log_ids, batch_id):
use_e2e_wireless_table_rec_model=inputs_g[
0
].useE2eWirelessTableRecModel,
markdown_ignore_labels=inputs_g[0].markdownIgnoreLabels,
)
)

Expand Down Expand Up @@ -199,10 +201,13 @@ def run_batch(self, inputs, log_ids, batch_id):

def _group_inputs(self, inputs):
def _to_hashable(obj):
if isinstance(obj, list):
return tuple(obj)
elif isinstance(obj, dict):
return tuple(sorted(obj.items()))
if isinstance(obj, dict):
return tuple(
(_to_hashable(k), _to_hashable(v))
for k, v in sorted(obj.items(), key=lambda x: repr(x[0]))
)
elif isinstance(obj, list):
return tuple(_to_hashable(x) for x in obj)
else:
return obj

Expand Down Expand Up @@ -243,6 +248,7 @@ def _hash(input):
input.useOcrResultsWithTableCells,
input.useE2eWiredTableRecModel,
input.useE2eWirelessTableRecModel,
input.markdownIgnoreLabels,
),
)
)
Expand Down Expand Up @@ -284,20 +290,32 @@ def _preprocess(self, input, log_id):
else self.app_config.visualize
)

file_bytes = utils.get_raw_bytes(input.file)
images, data_info = utils.file_to_images(
file_bytes,
file_type,
max_num_imgs=self.context["max_num_input_imgs"],
)
try:
file_bytes = utils.get_raw_bytes(input.file)
images, data_info = utils.file_to_images(
file_bytes,
file_type,
max_num_imgs=self.context["max_num_input_imgs"],
)
except Exception as e:
logging.error("Failed to get input file bytes: %s", e)
return protocol.create_aistudio_output_without_result(
422,
"Input file is invalid",
log_id=log_id,
)

return images, data_info, visualize_enabled

def _postprocess(self, images, data_info, visualize_enabled, preds, log_id, input):
layout_parsing_results: List[Dict[str, Any]] = []
for i, (img, item) in enumerate(zip(images, preds)):
pruned_res = app_common.prune_result(item.json["res"])
md_data = item.markdown
# XXX
md_data = item._to_markdown(
pretty=input.prettifyMarkdown,
show_formula_number=input.showFormulaNumber,
)
md_text = md_data["markdown_texts"]
md_imgs = app_common.postprocess_images(
md_data["markdown_images"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@ use_chart_recognition: False
use_region_detection: True
format_block_content: False

markdown_ignore_labels:
- number
- footnote
- header
- header_image
- footer
- footer_image
- aside_text

SubModules:
LayoutDetection:
module_name: layout_detection
Expand Down
1 change: 1 addition & 0 deletions deploy/hps/sdk/pipelines/PP-StructureV3/version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.3.5
Loading