Skip to content

Commit 5b2ba70

Browse files
committed
Fix: Pass local_files_only from pipeline() to model loading
1 parent decde58 commit 5b2ba70

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/transformers/pipelines/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -687,12 +687,14 @@ def pipeline(
687687

688688
code_revision = kwargs.pop("code_revision", None)
689689
commit_hash = kwargs.pop("_commit_hash", None)
690+
local_files_only = kwargs.pop("local_files_only", False)
690691

691692
hub_kwargs = {
692693
"revision": revision,
693694
"token": token,
694695
"trust_remote_code": trust_remote_code,
695696
"_commit_hash": commit_hash,
697+
"local_files_only": local_files_only,
696698
}
697699

698700
if task is None and model is None:

0 commit comments

Comments
 (0)