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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.0.2

* adding parameter to table image preprocessor related to the image size

## 1.0.1

* fix: moving the table transformer model to device when loading the model instead of once the model is loaded.
Expand Down
2 changes: 1 addition & 1 deletion unstructured_inference/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.0.1" # pragma: no cover
__version__ = "1.0.2" # pragma: no cover
3 changes: 3 additions & 0 deletions unstructured_inference/models/tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ def initialize(
"""Loads the donut model using the specified parameters"""
self.device = device
self.feature_extractor = DetrImageProcessor.from_pretrained(model)
# value not set in the configuration and needed for newer models
# https://huggingface.co/microsoft/table-transformer-structure-recognition-v1.1-all/discussions/1
self.feature_extractor.size["shortest_edge"] = 800

try:
logger.info("Loading the table structure model ...")
Expand Down