CLIP
CLIP copied to clipboard
how to load checkpoint trained using openclip codebase
trafficstars
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)
I haven't tried, but it appears that you would need to do the inverse of what's done in:
https://github.com/mlfoundations/open_clip/blob/74a72f3a4829656a9cfd8bae02253e2d28ab05d1/src/open_clip/model.py#L341-L391
In order to get a state_dict object compatible with this repo.