Skip to content

Commit cfbcf9f

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

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

optimum/intel/pipelines/pipeline_base.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -291,14 +291,13 @@ def pipeline(
291291
if load_feature_extractor and model_id and feature_extractor is None:
292292
feature_extractor = AutoFeatureExtractor.from_pretrained(model_id, **hub_kwargs, **model_kwargs)
293293

294-
if torch_dtype is not None:
295-
kwargs["torch_dtype"] = torch_dtype
296294

297295
return transformers_pipeline(
298296
task,
299297
model=model,
300298
tokenizer=tokenizer,
301299
feature_extractor=feature_extractor,
302300
use_fast=use_fast,
301+
torch_dtype=torch_dtype,
303302
**kwargs,
304303
)

0 commit comments

Comments
 (0)