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

support a generic clip-like model #30

Closed
rom1504 opened this issue Nov 15, 2022 · 6 comments
Closed

support a generic clip-like model #30

rom1504 opened this issue Nov 15, 2022 · 6 comments

Comments

@rom1504
Copy link
Contributor

rom1504 commented Nov 15, 2022

instead of supporting ton of models like suggested in #1

let's let the user pass a model looking like clip

for example https://github.com/FreddeFrallan/Multilingual-CLIP is like this

@rom1504
Copy link
Contributor Author

rom1504 commented Nov 23, 2022

ways here:

  • use https://github.com/dmarx/Multi-Modal-Comparators
  • implement a few simple clip variants here (mclip, chinese clip, japanese clip)
  • expose a way to plug any clip-looking function here (and use it in python ?) ?
  • something similar than mmc but packaged

@rom1504
Copy link
Contributor Author

rom1504 commented Nov 23, 2022

mmc is not usable, see dmarx/Multi-Modal-Comparators#41

so I'm thinking to take this plan

  1. define a simple generic interface
  2. implement a few interesting clips with optional deps
  3. when happy with result, move to dedicated package

@dmarx
Copy link

dmarx commented Nov 26, 2022

I haven't touched MMC in a while and had recently been thinking about revisiting it. I think I have a solution that satisfies both my original goal and your packaging needs, but I'd also be open to starting with a fresh solution and use lessons learned. Anyway, here's the idea I had with mmc:

  • trim the package down to a bare installation, maybe shipping with open-clip or clip-anytorch
  • provide scripts and instructions users can use to install all models, groups of models, or individual models as needed. this could be as simple as renaming the current pyproject.toml so it isn't auto-detected by build tools and just add an additional build step to rename this file (after which the current install instructions would still apply)

Need to double check that it's ready for merge, but the changes staged in the ezmode PR adopts the openai/CLIP interface, including returning preprocessor and attaching tokenizer to clip.tokenize

@dmarx
Copy link

dmarx commented Nov 27, 2022

Another MMC-esque generic interface to consider: https://github.com/salesforce/LAVIS

@rom1504
Copy link
Contributor Author

rom1504 commented Dec 26, 2022

#50 is a first part in this

@rom1504
Copy link
Contributor Author

rom1504 commented Feb 3, 2023

mostly done

@rom1504 rom1504 closed this as completed Feb 3, 2023
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

2 participants