Skip to content

Commit

Permalink
Add DPT support for ORTModelForSemanticSegmentation (#1759)
Browse files Browse the repository at this point in the history
* add DPT support

* make style
  • Loading branch information
merveenoyan committed Mar 18, 2024
1 parent 23fe6f7 commit 7e08a82
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions optimum/exporters/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,8 @@ class TasksManager:
"feature-extraction",
"image-feature-extraction",
"depth-estimation",
"image-segmentation",
"semantic-segmentation",
onnx="DptOnnxConfig",
),
"electra": supported_tasks_mapping(
Expand Down
2 changes: 1 addition & 1 deletion tests/onnxruntime/test_modeling.py
Original file line number Diff line number Diff line change
Expand Up @@ -2961,7 +2961,7 @@ def test_compare_to_io_binding(self, model_arch):


class ORTModelForSemanticSegmentationIntegrationTest(ORTModelTestMixin):
SUPPORTED_ARCHITECTURES = ("segformer",)
SUPPORTED_ARCHITECTURES = ("segformer", "dpt")

FULL_GRID = {"model_arch": SUPPORTED_ARCHITECTURES}
ORTMODEL_CLASS = ORTModelForSemanticSegmentation
Expand Down
1 change: 1 addition & 0 deletions tests/onnxruntime/utils_onnxruntime_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
"deit": "hf-internal-testing/tiny-random-DeiTModel",
"donut": "fxmarty/tiny-doc-qa-vision-encoder-decoder",
"detr": "hf-internal-testing/tiny-random-detr",
"dpt": "hf-internal-testing/tiny-random-DPTModel",
"distilbert": "hf-internal-testing/tiny-random-DistilBertModel",
"electra": "hf-internal-testing/tiny-random-ElectraModel",
"encoder-decoder": {
Expand Down

0 comments on commit 7e08a82

Please sign in to comment.