Skip to content

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

feat: adjust batch ratio based on increased GPU memory thresholds

myhloliad555cd96865
diff --git a/mineru/backend/pipeline/pipeline_analyze.py b/mineru/backend/pipeline/pipeline_analyze.py
index 39ccf615..27df9de1 100644
--- a/mineru/backend/pipeline/pipeline_analyze.py
+++ b/mineru/backend/pipeline/pipeline_analyze.py
@@ -312,7 +312,9 @@ def batch_image_analyze(
) from e
gpu_memory = get_vram(device)
- if gpu_memory >= 16:
+ if gpu_memory >= 32:
+ batch_ratio = 16
+ elif gpu_memory >= 16:
batch_ratio = 8
elif gpu_memory >= 8:
batch_ratio = 4