Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyasMoutawwakil committed Jul 12, 2024
1 parent a84ae07 commit e4da154
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion optimum_benchmark/task_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,9 @@ def infer_task_from_model_name_or_path(model_name_or_path: str, revision: Option
AUTO_TEXT2IMAGE_PIPELINES_MAPPING,
)

config, _ = DiffusionPipeline.load_config(model_name_or_path)
config = DiffusionPipeline.load_config(model_name_or_path)
config, _ = config if isinstance(config, tuple) else (config, None)

model_class_name = config["_class_name"]

for task_name, model_mapping in (
Expand Down

0 comments on commit e4da154

Please sign in to comment.