Transforms complex documents like PDFs and Office docs into LLM-ready markdown/JSON for your Agentic workflows.
Python ai4sciencedocument-analysisdocxextract-datalayout-analysisocrparserpdfpdf-converterpdf-extractor-llmpdf-extractor-pretrainpdf-extractor-ragpdf-parserpptxpythonxlsx
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.pyindex 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 timeimport pypdfium2 as pdfiumfrom loguru import logger+from mineru_vl_utils import MinerUClientfrom mineru_vl_utils.structs import ContentBlockfrom 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.pyindex 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.pyindex 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.pyindex 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),