Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wangsen
MinerU
Commits
db4edf28
Commit
db4edf28
authored
Jun 30, 2025
by
myhloli
Browse files
fix: enhance memory cleaning condition to check model list length
parent
12b64a0e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
mineru/backend/pipeline/model_json_to_middle_json.py
mineru/backend/pipeline/model_json_to_middle_json.py
+1
-1
No files found.
mineru/backend/pipeline/model_json_to_middle_json.py
View file @
db4edf28
...
@@ -236,7 +236,7 @@ def result_to_middle_json(model_list, images_list, pdf_doc, image_writer, lang=N
...
@@ -236,7 +236,7 @@ def result_to_middle_json(model_list, images_list, pdf_doc, image_writer, lang=N
"""清理内存"""
"""清理内存"""
pdf_doc
.
close
()
pdf_doc
.
close
()
if
os
.
getenv
(
'MINERU_DONOT_CLEAN_MEM'
)
is
None
:
if
os
.
getenv
(
'MINERU_DONOT_CLEAN_MEM'
)
is
None
and
len
(
model_list
)
>
10
:
clean_memory
(
get_device
())
clean_memory
(
get_device
())
return
middle_json
return
middle_json
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment