Replies: 2 comments 1 reply
-
Hi @inbfor! I'm Dosu and I’m helping the docling team. High memory usage after recognition in docling-serve with EasyOCR is not expected and is usually a sign that memory cleanup isn't happening after each job. The code does not currently perform explicit memory cleanup—there are no calls to To fix this, add GPU memory cleanup in the import torch
# ... inside the finally block:
torch.cuda.empty_cache() If you create job-specific models or tensors, explicitly delete them with For large documents, consider processing in smaller chunks (using To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
-
Are you comparing with the CLI usage of Docling? Can you please post which version of Docling you are comparing and which version of Docling Serve? The last releases (of yesterday) just fixed a memory issue in the docling-parse-v4 which is default in Docling Serve but not in the Docling CLI. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
For some reason, memory usage doesn't go back after document recognition - because of this we have OOM issue. Is this expected and if not, what can we do? As an OCR engine we use EasyOCR.
Beta Was this translation helpful? Give feedback.
All reactions