Skip to content

Commit

Permalink
ViTPose export fix (#2192)
Browse files Browse the repository at this point in the history
* Remove feature extraction support for vitpose

* remove unnecessary
  • Loading branch information
echarlaix authored Feb 19, 2025
1 parent 0245619 commit 3d8957c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
2 changes: 1 addition & 1 deletion optimum/exporters/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -1242,7 +1242,7 @@ class TasksManager:
"image-classification",
onnx="VitMSNOnnxConfig",
),
"vitpose": supported_tasks_mapping("feature-extraction", "keypoint-detection", onnx="VitPoseOnnxConfig"),
"vitpose": supported_tasks_mapping("keypoint-detection", onnx="VitPoseOnnxConfig"),
"vits": supported_tasks_mapping(
"text-to-audio",
onnx="VitsOnnxConfig",
Expand Down
12 changes: 0 additions & 12 deletions optimum/utils/input_generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -1622,12 +1622,6 @@ def __init__(
self.height = preprocessor.crop_size.get("height", self.height)
self.width = preprocessor.crop_size.get("width", self.width)

def generate(self, input_name: str, framework: str = "pt", int_dtype: str = "int64", float_dtype: str = "fp32"):
input_ = super().generate(
input_name=input_name, framework=framework, int_dtype=int_dtype, float_dtype=float_dtype
)
return input_


class DummyVisionStaticInputGenerator(DummyVisionInputGenerator):
def __init__(
Expand Down Expand Up @@ -1657,12 +1651,6 @@ def __init__(
self.height = preprocessor.size.get("height", self.height)
self.width = preprocessor.size.get("width", self.width)

def generate(self, input_name: str, framework: str = "pt", int_dtype: str = "int64", float_dtype: str = "fp32"):
input_ = super().generate(
input_name=input_name, framework=framework, int_dtype=int_dtype, float_dtype=float_dtype
)
return input_


class PerceiverDummyInputGenerator(DummyVisionStaticInputGenerator):
pass
Expand Down

0 comments on commit 3d8957c

Please sign in to comment.