diff --git a/src/transformers/pipelines.py b/src/transformers/pipelines.py index 16589469256a3b..bc1d885cb324a4 100755 --- a/src/transformers/pipelines.py +++ b/src/transformers/pipelines.py @@ -2122,6 +2122,6 @@ def pipeline( "Model might be a PyTorch model (ending with `.bin`) but PyTorch is not available. " "Trying to load the model with Tensorflow." ) - model = model_class.from_pretrained(model, config=config, **model_kwargs) + model = model_class.from_pretrained(model, config=config, return_tuple=True, **model_kwargs) return task_class(model=model, tokenizer=tokenizer, modelcard=modelcard, framework=framework, task=task, **kwargs)