-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
feat: support onnx backend for openclip #781
Conversation
Codecov Report
@@ Coverage Diff @@
## main #781 +/- ##
==========================================
+ Coverage 85.72% 85.92% +0.20%
==========================================
Files 21 21
Lines 1121 1137 +16
==========================================
+ Hits 961 977 +16
Misses 160 160
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
elif self._model_name.endswith('-quickgelu'): | ||
return self._model_name[:-10] | ||
return self._model_name.replace('/', '-') | ||
elif model_name.endswith('-quickgelu'): |
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.
there will be no quickgelu
@staticmethod | ||
def get_model_name(name: str): | ||
return name | ||
|
||
@property | ||
def model_name(self): | ||
return self.__class__.get_model_name(self._name) |
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.
can we simply return xxx.name
?
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.
To get the model name without initializing the instance (avoiding downloading and loading weights), we must use staticmethod . That's the reason I implement get_model_name
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.
LGTM!
8b90a87
to
ddf86cf
Compare
No description provided.