Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 79ae3d9

Browse files
jiqing-fengecharlaix
andauthoredMay 6, 2024
Update optimum/intel/pipelines/pipeline_base.py
Co-authored-by: Ella Charlaix <80481427+echarlaix@users.noreply.github.com>
1 parent 6fb8863 commit 79ae3d9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎optimum/intel/pipelines/pipeline_base.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,8 @@ def pipeline(
257257
elif values["type"] not in ["multimodal", "audio", "video"]:
258258
raise ValueError(f"SUPPORTED_TASK {_task} contains invalid type {values['type']}")
259259

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
260+
load_tokenizer = task not in no_tokenizer_tasks
261+
load_feature_extractor = task not in no_feature_extractor_tasks
262262

263263
commit_hash = kwargs.pop("_commit_hash", None)
264264

0 commit comments

Comments
 (0)
Please sign in to comment.