Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyasMoutawwakil committed Jul 8, 2024
1 parent 1f1f302 commit ff7ea35
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions optimum/exporters/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -1754,9 +1754,9 @@ def infer_task_from_model(
cache_dir=cache_dir,
token=token,
)
elif issubclass(model, (PreTrainedModel, TFPreTrainedModel, DiffusionPipeline)):
elif issubclass(model, object):
task_name = cls._infer_task_from_model_or_model_class(model_class=model)
elif isinstance(model, (PreTrainedModel, TFPreTrainedModel, DiffusionPipeline)):
elif isinstance(model, object):
task_name = cls._infer_task_from_model_or_model_class(model=model)

if task_name is None:
Expand Down

0 comments on commit ff7ea35

Please sign in to comment.