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

how to convert my trained openclip model "epoch_499.pt" to huggingface (hf) format (.bin) ? #766

Open
jzssz opened this issue Dec 15, 2023 · 2 comments

Comments

@jzssz
Copy link

jzssz commented Dec 15, 2023

I'm very anxious about this issue. thanks a lot !!!!!!

@jzssz jzssz changed the title how to convert my trained openclip model "epoch_499.pt" to huggingface(hf) format(.bin)? how to convert my trained openclip model "epoch_499.pt" to huggingface (hf) format (.bin) ? Dec 15, 2023
@gabrielilharco
Copy link
Collaborator

@mittski
Copy link

mittski commented Jan 20, 2024

Hi @jzssz, please see https://github.com/mlfoundations/open_clip?tab=readme-ov-file#pushing-models-to-hugging-face-hub

For anyone trying to do this without juggling to and from the HF hub, you with overwrite tmpdir after "with TemporaryDirectory() as tmpdir:" as a local directory in push_to_hf_hub.py's push_to_hf_hub function, and it'll save everything there

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

3 participants