mirror of
https://github.com/openai/CLIP.git
synced 2026-11-05 01:37:26 +00:00
[PR #219] [MERGED] Patch clip model for ONNX compatibility #473
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#473
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?
📋 Pull Request Information
Original PR: https://github.com/openai/CLIP/pull/219
Author: @chajath
Created: 2/18/2022
Status: ✅ Merged
Merged: 4/10/2022
Merged by: @jongwook
Base:
main← Head:chajath/onnx-compatibility-patches📝 Commits (2)
1937532Patch clip model for ONNX compatibility772e202Add compatibility fix for torch 1.7📊 Changes
2 files changed (+9 additions, -5 deletions)
View changed files
📝
clip/clip.py(+7 -3)📝
clip/model.py(+2 -2)📄 Description
Team,
When productionizing AI models like CLIP, it is often useful to be able to export to ONNX so that we can utilize training and serving ecosystem built around ONNX runtime. This PR includes changes that are necessary to make ONNX compilation and runtime working without needing to further patch the code:
With these changes, we can now compile and run ONNX models. For example:
I've locally verified the result. I see that CLIP has a github action to run pytest. I will be happy to further contribute by adding onnx-specific tests to see if the model can be compiled and the resulting model is correct.
I understand that ONNX compatibility might not be the primary goal of
CLIPrepo, but maintaining compatibility with ONNX will be immensely useful to the ML practitioners out in the wild, so please take a look at the change.Thanks!
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.