Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
2b77d8b
Use cache mount for genai docker (#4954)
Bobholamovic Jan 29, 2026
9d39bc9
Fix HPS order bug (#4955)
Bobholamovic Jan 29, 2026
966969f
Fix transformers version (#4956)
Bobholamovic Jan 29, 2026
306430a
Fix HPS and remove scipy from required deps (#4957)
Bobholamovic Jan 29, 2026
01f63a6
[Cherry-Pick]bugfix: unexpected change of the constant IMAGE_LABELS (…
changdazhou Jan 30, 2026
363b508
[METAX] add ppdoclayv3 to METAX_GPU_WHITELIST (#4959)
handsomecoderyang Jan 30, 2026
d59a344
vllm 0.10.2 needs transformers 4.x (#4963)
zhang-prog Jan 30, 2026
622b602
Bump version to 3.4.1
Bobholamovic Jan 30, 2026
c78fb95
Support setting PDF rendering scale factor (#4967)
Bobholamovic Feb 2, 2026
45989f0
Fix/doc vlm async cancellation (#4969) (#4971)
scyyh11 Feb 4, 2026
0a936ba
Fix typo (#4982)
Bobholamovic Feb 6, 2026
f790eff
add llama.cpp support (#4983)
zhang-prog Feb 9, 2026
a10d7c5
Add Intel GPU config (#4992)
Bobholamovic Feb 11, 2026
92a190e
Remove PaddleOCR-VL server page limit (#4991)
Bobholamovic Feb 11, 2026
04476cb
PaddleX Add ROCm 7.0 compatibility patches (#4990) (#4996)
M4jupitercannon Feb 12, 2026
edb4022
[Feat] Support setting expiration for BOS URLs (#4993)
Bobholamovic Feb 12, 2026
69e8d75
add \n for seal rec && bugfix for text in table && delete_pass by mod…
changdazhou Feb 13, 2026
f95d873
Fix auto batch size for PaddleOCR-VL-1.5-0.9B (#5003)
Bobholamovic Feb 13, 2026
c88d4c1
Bump version to 3.4.2
Bobholamovic Feb 13, 2026
e92d21f
Update HPS frozon deps (#5004)
Bobholamovic Feb 13, 2026
41b695b
update vlm batch_size (#5005)
zhang-prog Feb 13, 2026
901393a
support modular langchain as well
np-n Feb 25, 2026
b39f430
fix
np-n Feb 25, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Support setting PDF rendering scale factor (#4967)
  • Loading branch information
Bobholamovic committed Feb 2, 2026
commit c78fb958e47013d9c4abe80b11e53f71a2f82602
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from ....utils import logging
from ....utils.cache import CACHE_DIR
from ....utils.download import download
from ....utils.flags import PDF_RENDER_SCALE
from ...utils.io import PDFReader
from .base_batch_sampler import BaseBatchSampler, Batch

Expand Down Expand Up @@ -48,7 +49,7 @@ class ImageBatchSampler(BaseBatchSampler):

def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.pdf_reader = PDFReader()
self.pdf_reader = PDFReader(zoom=PDF_RENDER_SCALE)

# XXX: auto download for url
def _download_from_url(self, in_path):
Expand Down
5 changes: 2 additions & 3 deletions paddlex/inference/serving/infra/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
from typing_extensions import Literal, ParamSpec, TypeAlias, assert_never

from ....utils.deps import function_requires_deps, is_dep_available
from ...utils.pdfium_lock import pdfium_lock
from ...utils.pdfium_lock import PDF_RENDER_SCALE, pdfium_lock
from .models import ImageInfo, PDFInfo, PDFPageInfo

if is_dep_available("aiohttp"):
Expand Down Expand Up @@ -191,8 +191,7 @@ def read_pdf(
if max_num_imgs is not None and len(images) >= max_num_imgs:
page.close()
break
# TODO: Do not always use zoom=2.0
zoom = 2.0
zoom = PDF_RENDER_SCALE
deg = 0
image = page.render(scale=zoom, rotation=deg).to_numpy()
images.append(image)
Expand Down
6 changes: 5 additions & 1 deletion paddlex/utils/flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ def get_flag_from_env_var(name, default, format_func=str):
"PADDLE_PDX_DISABLE_MODEL_SOURCE_CHECK", False
)

HUGGING_FACE_ENDPOINT = os.environ.get("PADDLE_PDX_HUGGING_FACE_ENDPOINT", "https://huggingface.co")
HUGGING_FACE_ENDPOINT = os.environ.get(
"PADDLE_PDX_HUGGING_FACE_ENDPOINT", "https://huggingface.co"
)

# Inference Benchmark
INFER_BENCHMARK = get_flag_from_env_var("PADDLE_PDX_INFER_BENCHMARK", False)
Expand All @@ -87,3 +89,5 @@ def get_flag_from_env_var(name, default, format_func=str):
INFER_BENCHMARK_USE_CACHE_FOR_READ = get_flag_from_env_var(
"PADDLE_PDX_INFER_BENCHMARK_USE_CACHE_FOR_READ", False
)

PDF_RENDER_SCALE = get_flag_from_env_var("PADDLE_PDX_PDF_RENDER_SCALE", 2.0, float)