Closed krasserm closed 2 years ago
I've just seen that this PR isn't compatible with the recent commits on main
from today. Will fix it and push an update soon ...
This should now work with the recent autocast additions. Appreciate any guidance to improve things further.
Hi, thanks for tackling this! I agree it's an important feature.
I think would like to avoid putting a direct dependency from clip back to clip inference.
A simple way to avoid this could be to move the load_clip.py file outside of the inference folder.
Yep, that's cleaner. Just pushed the changes.
Can you rebase this on main ?
Just rebased on main.
Thanks
You're welcome, thanks for merging and, of course, for your great work on clip-retrieval
!
This pull requests extends
clip_back
to support OpenCLIP models, including the latest from OpenCLIP 2.x releases (ViT-H/14, ...). For example, when runningwith the following
indices_paths.json
filethen queries are encoded with the recently released OpenCLIP
ViT-H-14
model. Current limitation is that using OpenCLIP models requireprovide_safety_model
,provide_violence_detector
andprovide_aesthetic_embeddings
to be set tofalse
.