Skip to content

Transforms complex documents like PDFs and Office docs into LLM-ready markdown/JSON for your Agentic workflows.

feat: add hybrid-flash engine and client options for enhanced multi-language support

myhloli7b3b655721ad
diff --git a/mineru/backend/hybrid_flash/hybrid_flash_analyze.py b/mineru/backend/hybrid_flash/hybrid_flash_analyze.py
index a11f8cf3..212a7c24 100644
--- a/mineru/backend/hybrid_flash/hybrid_flash_analyze.py
+++ b/mineru/backend/hybrid_flash/hybrid_flash_analyze.py
@@ -4,6 +4,7 @@ import time
import pypdfium2 as pdfium
from loguru import logger
+from mineru_vl_utils import MinerUClient
from mineru_vl_utils.structs import ContentBlock
from tqdm import tqdm
@@ -284,7 +285,7 @@ def _get_device_for_cleanup():
def doc_analyze(
pdf_bytes,
image_writer: DataWriter | None = None,
- predictor=None,
+ predictor: MinerUClient | None = None,
backend="transformers",
parse_method: str = "auto",
language: str = "ch",
@@ -412,7 +413,7 @@ def doc_analyze(
async def aio_doc_analyze(
pdf_bytes,
image_writer: DataWriter | None = None,
- predictor=None,
+ predictor: MinerUClient | None = None,
backend="transformers",
parse_method: str = "auto",
language: str = "ch",
diff --git a/mineru/cli/api_request.py b/mineru/cli/api_request.py
index a90cb8d1..4e640a31 100644
--- a/mineru/cli/api_request.py
+++ b/mineru/cli/api_request.py
@@ -92,7 +92,9 @@ async def parse_request_form(
- vlm-auto-engine: High accuracy via local computing power, supports Chinese and English documents only.
- vlm-http-client: High accuracy via remote computing power(client suitable for openai-compatible servers), supports Chinese and English documents only.
- hybrid-auto-engine: Next-generation high accuracy solution via local computing power, supports multiple languages.
-- hybrid-http-client: High accuracy via remote computing power but requires a little local computing power(client suitable for openai-compatible servers), supports multiple languages.""",
+- hybrid-flash-auto-engine: Experimental hybrid-flash analyze path via local computing power, supports multiple languages.
+- hybrid-http-client: High accuracy via remote computing power but requires a little local computing power(client suitable for openai-compatible servers), supports multiple languages.
+- hybrid-flash-http-client: Experimental hybrid-flash analyze path via remote computing power(client suitable for openai-compatible servers), supports multiple languages.""",
),
] = "hybrid-auto-engine",
parse_method: Annotated[
diff --git a/mineru/cli/client.py b/mineru/cli/client.py
index c00c68d5..05021446 100644
--- a/mineru/cli/client.py
+++ b/mineru/cli/client.py
@@ -1034,8 +1034,10 @@ async def run_orchestrated_cli(
"pipeline",
"vlm-http-client",
"hybrid-http-client",
+ "hybrid-flash-http-client",
"vlm-auto-engine",
"hybrid-auto-engine",
+ "hybrid-flash-auto-engine",
]
),
default="hybrid-auto-engine",
@@ -1045,7 +1047,9 @@ async def run_orchestrated_cli(
vlm-auto-engine: High accuracy via local computing power.
vlm-http-client: High accuracy via remote computing power(client suitable for openai-compatible servers).
hybrid-auto-engine: Next-generation high accuracy solution via local computing power.
+ hybrid-flash-auto-engine: Experimental hybrid-flash analyze path via local computing power.
hybrid-http-client: High accuracy but requires a little local computing power(client suitable for openai-compatible servers).
+ hybrid-flash-http-client: Experimental hybrid-flash analyze path via remote computing power(client suitable for openai-compatible servers).
Without method specified, hybrid-auto-engine will be used by default.""",
)
@click.option(
diff --git a/mineru/cli/gradio_app.py b/mineru/cli/gradio_app.py
index e305d69f..04c4b068 100644
--- a/mineru/cli/gradio_app.py
+++ b/mineru/cli/gradio_app.py
@@ -228,10 +228,12 @@ BACKEND_CHOICE_DEFINITIONS = [
"pipeline",
"vlm-auto-engine",
"hybrid-auto-engine",
+ "hybrid-flash-auto-engine",
]
HTTP_CLIENT_BACKEND_CHOICE_DEFINITIONS = [
"vlm-http-client",
"hybrid-http-client",
+ "hybrid-flash-http-client",
]
STATUS_STEP_DEFINITIONS = [
("status_step_prepare", STATUS_PREPARING_REQUEST),