We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6fb8863 commit 79ae3d9Copy full SHA for 79ae3d9
optimum/intel/pipelines/pipeline_base.py
@@ -257,8 +257,8 @@ def pipeline(
257
elif values["type"] not in ["multimodal", "audio", "video"]:
258
raise ValueError(f"SUPPORTED_TASK {_task} contains invalid type {values['type']}")
259
260
- load_tokenizer = False if task in no_tokenizer_tasks else True
261
- load_feature_extractor = False if task in no_feature_extractor_tasks else True
+ load_tokenizer = task not in no_tokenizer_tasks
+ load_feature_extractor = task not in no_feature_extractor_tasks
262
263
commit_hash = kwargs.pop("_commit_hash", None)
264
0 commit comments