-
Notifications
You must be signed in to change notification settings - Fork 130
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
Local inference image support #836
Conversation
✅ Deploy Preview for poetic-froyo-8baba7 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
3c30b10
to
39ea3f8
Compare
embedding_model_inst = self._get_or_init_image_model( | ||
model_name=model_name, **(image.options or {}) | ||
) | ||
image_data = base64.b64decode(image.image) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does seem like a lot of overhead and not really a user-friendly interface, but I understand why it is done like this (I assume, cause we want local remove work the same)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not for this PR, but we would need to discuss how to simplify image selection, as asking users to read image from file and encode it info base64 is not going to fly well
We can convert to base64 on our own, but we would either need PIL for that, or find some other ways |
* new: add inference object support * new: add inference object support * fix: remove redundant import * refactor: return newline * fix: fix propagate options test
* new: add backbone for image support * new: convert b64 to pil, embed images, add test * tests: add test file * refactor: replace 3 different inference object vars with a common one * fix: fix type hints * fix: fix type hints * tests: add tests * fix: remove redundant imports * new: propagate image options * Custom inference object (#837) * new: add inference object support * new: add inference object support * fix: remove redundant import * refactor: return newline * fix: fix propagate options test
embed