-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
[refactor embeddings] gligen + ip-adapter #6244
Conversation
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
This reverts commit 85f27fa.
|
||
|
||
class PositionNet(nn.Module): | ||
class GLIGENTextBoundingboxProjection(nn.Module): |
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.
@patrickvonplaten
Any rules around when we call it "Projection" vs "Embedding"?
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.
I follow this rule of thumb.
When you're representing some feature (time, bbox coordinates, tokens, etc.) in the latent space for the first time, it's better to call those representations embeddings. The subsequent operations performed on those representations are projections (more aligned with the literature in linear algebra).
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.
I like GLIGENTextBoundingboxProjection
- it's nicely specific
The remote_code tests fail due to the class name change. What should we do about this? |
|
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.
Very nice refactor - good to have more specific names here
@yiyixuxu I think it's okay to introduce as a breaking change. I don't seem to see it imported directly in a lot of public repos And importing the GLIGEN pipeline will be unaffected. |
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 👍🏽
* refactor ip-adapter-imageproj, gligen --------- Co-authored-by: yiyixuxu <yixu310@gmail,com>
* refactor ip-adapter-imageproj, gligen --------- Co-authored-by: yiyixuxu <yixu310@gmail,com>
* refactor ip-adapter-imageproj, gligen --------- Co-authored-by: yiyixuxu <yixu310@gmail,com>
continue refactoring embeddings: GLIGEN + IP-Adapter