-
Notifications
You must be signed in to change notification settings - Fork 27k
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
Use config.num_channels
in CLIP-like modeling files
#20857
Conversation
The documentation is not available anymore as the PR was closed or merged. |
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!
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.
Sounds good to me, I checked on the Hub and couldn't find any model that uses config.num_channels != 3.
What does this PR do?
config.num_channels
is not used in some CLIP-like modeling files. Unlike previous PRs like #20596 or #20844, we use this attribute in the modeling files in this PR.The only breaking case is when a user previously set
config.num_channels=X
withX !=3
, which is super unlikely IMO. (Even they did so, the actual Conv2D layer still uses3
as it is hard-coded in the currentmain
branch)