"tests/test_utils/test_box3d.py" did not exist on "6d37a3d03f0f6d5286c2d8f6ca10c4429d576377"
Commit 12b64a0e authored by myhloli's avatar myhloli
Browse files

fix: conditionally clean memory based on environment variable

parent d39aa87e
# Copyright (c) Opendatalab. All rights reserved.
import os
import time
from loguru import logger
......@@ -235,7 +236,8 @@ def result_to_middle_json(model_list, images_list, pdf_doc, image_writer, lang=N
"""清理内存"""
pdf_doc.close()
clean_memory(get_device())
if os.getenv('MINERU_DONOT_CLEAN_MEM') is None:
clean_memory(get_device())
return middle_json
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment