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
fix: enhance memory cleaning condition to check model list length
myhlolif41fc406c325
diff --git a/mineru/backend/pipeline/model_json_to_middle_json.py b/mineru/backend/pipeline/model_json_to_middle_json.pyindex ca76c255..511ba669 100644--- a/mineru/backend/pipeline/model_json_to_middle_json.py+++ b/mineru/backend/pipeline/model_json_to_middle_json.py@@ -236,7 +236,7 @@ def result_to_middle_json(model_list, images_list, pdf_doc, image_writer, lang=N"""清理内存"""pdf_doc.close()- if os.getenv('MINERU_DONOT_CLEAN_MEM') is None and len(model_list) > 10:+ if os.getenv('MINERU_DONOT_CLEAN_MEM') is None and len(model_list) >= 10:clean_memory(get_device())return middle_json