Can anyone upload a Tensorflow version, thanks

#2
by ddong - opened

Urgently need tensorflow version

Hi there! Even though there isn't a TF checkpoint up here, you should be able to load and convert the model in TensorFlow with the following

from transformers import TFCLIPModel

model = TFCLIPModel.from_pretrained("openai/clip-vit-large-patch14-336", from_pt=True)

And then you should be able to save the weights with model.save_pretrained('weights-folder') or even push it to the hub anywhere you'd like.

There's also transformers-cli pt-to-tf --model-name <your clip model hub name> which should also work, and it does a bunch of checks on top. I think it'll also open a PR on the hub here if the checks pass.

I'll create a TF version for you in the meantime as well!

Update – I did the conversion and uploaded the TF version, so you can load with without needing to including from_pt=True. Let me know if there's anything else I can help with, otherwise I'll close this discussion in a day or two 😊

Update – I did the conversion and uploaded the TF version, so you can load with without needing to including from_pt=True. Let me know if there's anything else I can help with, otherwise I'll close this discussion in a day or two 😊

Thank you for sharing the tf version, your submission is a great help to my research!

NimaBoscarino changed discussion status to closed

Sign up or log in to comment