-
Notifications
You must be signed in to change notification settings - Fork 25.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pipeline
does not load from local folder, instead, it always downloads models from the internet.
#21613
Comments
cc @Narsil |
Seems to be working fine on my end, but there needs to be a few modifications (I'm super suprises it can download anything, your included code just crashes normally). from transformers import pipeline
pipe = pipeline(task="image-classification", model="google/vit-base-patch16-224")
pipe.save_pretrained("./local_vit")
pipe = pipeline(task="image-classification", model="./local_vit") You need to specify the On what version of transformers are you on ? |
Hi, sorry I specified the task for local, and it still does not work. I will check the version. |
the version is 4.24.0 |
I cannot reproduce even on 4.24.0 Can you include the full script + error ? |
sure. I am still seeing the error. I will post the code later. |
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread. Please note that issues that do not follow the contributing guidelines are likely to be ignored. |
System Info
I create
pipeline
and calledsave_pretrained(...)
to save to some local directory. However, when I load it back usingpipeline(model="local_folder")
, it either load from cache or try to start downloading from the internet.However, if I do the following, it works. I am using the latest
transformers
. am I misused it or misunderstood something?Who can help?
No response
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
and it will start download the pretrained model again.
Expected behavior
I expect it loads the model from the local folder
The text was updated successfully, but these errors were encountered: