mirror of
https://github.com/openai/CLIP.git
synced 2026-11-05 01:37:26 +00:00
[GH-ISSUE #350] how to load checkpoint trained using openclip codebase #303
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
openai/CLIP#303
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @lezhang7 on GitHub (Apr 16, 2023).
Original GitHub issue: https://github.com/openai/CLIP/issues/350
Hi, I have a model trained with open clip codebase, and I wonder if I can directly load that checkpoint into the clip model by
model, preprocess = clip.load("checkpoints.pt", device=device, jit=False)@jongwook commented on GitHub (May 5, 2023):
I haven't tried, but it appears that you would need to do the inverse of what's done in:
github.com/mlfoundations/open_clip@74a72f3a48/src/open_clip/model.py (L341-L391)In order to get a state_dict object compatible with this repo.