Skip to content
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

If you tried to load a PyTorch model from a TF 2.0 checkpoint, please set from_tf=True. #46

Open
sunny5156 opened this issue Aug 9, 2021 · 5 comments

Comments

@sunny5156
Copy link

image

image

OSError: Unable to load weights from pytorch checkpoint file for 'facebook/m2m100_1.2B' at '/cache/transformers/68002fb1a7773d8d8373f1a230588141964ef9f249db6987681f295dbe85356c.ee70663869b89be4f68eed03a21d5c3400b223cb544883f411e469aaea0a25f9'If you tried to load a PyTorch model from a TF 2.0 checkpoint, please set from_tf=True.

@nreimers
Copy link
Member

nreimers commented Aug 9, 2021

Not sure why this happens. Maybe try to to clean your huggingface cache. Maybe the download was corrupted.

@sunny5156
Copy link
Author

change transformers version to 4.4,it's works

@ankitvirla
Copy link

Hi, I'm facing the same issue.
If it's solved by anyone can you please mention the way to fix it.
image

@eatinghungry
Copy link

Hi, I'm facing the same issue. If it's solved by anyone can you please mention the way to fix it. image

OSError: Unable to load weights from pytorch checkpoint file for './blenderbot_small-90M' at ./blenderbot_small-90M/pytorch_model.bin'If you tried to load a PyTorch model from a TF 2.0 checkpoint, please set from_tf=True.

hey do u know how to solve this problem now? thanks

@Eiteljoerch
Copy link

Hi,
I habe the same issue on my macbook M1.
I installed invoke AI
Then this message came up, while trying to run it:

OSError: Unable to load weights from pytorch checkpoint file for '/Users/epicmusic/invokeai/models/openai/clip-vit-large-patch14/models--openai--clip-vit-large-patch14/snapshots/8d052a0f05efbaefbc9e8786ba291cfdf93e5bff/pytorch_model.bin' at '/Users/epicmusic/invokeai/models/openai/clip-vit-large-patch14/models--openai--clip-vit-large-patch14/snapshots/8d052a0f05efbaefbc9e8786ba291cfdf93e5bff/pytorch_model.bin'. If you tried to load a PyTorch model from a TF 2.0 checkpoint, please set from_tf=True.

If I would know, where to set tf=True, I would be happy.

I am not a coder, but if I understand, what to do, I will fix it.
Thanks for help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants