Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.22.8

### Enhancements
- **Reduce PaddleOCR memory usage**: Set `rec_batch_num=1` when creating PaddleOCR instances to reduce Paddle inference engine arena allocation from 4x500 MiB to 1x500 MiB during text recognition

## 0.22.7

### Fixes
Expand Down
2 changes: 1 addition & 1 deletion unstructured/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.22.7" # pragma: no cover
__version__ = "0.22.8" # pragma: no cover
2 changes: 2 additions & 0 deletions unstructured/partition/utils/ocr_models/paddle_ocr.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def load_agent(self, language: str):
lang=language,
enable_mkldnn=True,
show_log=False,
rec_batch_num=1,
)
except AttributeError:
paddle_ocr = PaddleOCR(
Expand All @@ -56,6 +57,7 @@ def load_agent(self, language: str):
lang=language,
enable_mkldnn=False,
show_log=False,
rec_batch_num=1,
)
return paddle_ocr

Expand Down
Loading