-
Notifications
You must be signed in to change notification settings - Fork 141
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
[diffusion_labs] Move attention and res blocks under modules #490
Conversation
[ghstack-poisoned]
ghstack-source-id: f349ffbd25dc494c85a24fad5a600ea78859a079 Pull Request resolved: #490
@ebsmothers has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Codecov ReportAll modified lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## gh/ebsmothers/21/base #490 +/- ##
========================================================
Coverage ? 74.12%
========================================================
Files ? 207
Lines ? 14259
Branches ? 0
========================================================
Hits ? 10569
Misses ? 3690
Partials ? 0 ☔ View full report in Codecov by Sentry. |
Differential Revision: [D50288362](https://our.internmc.facebook.com/intern/diff/D50288362) [ghstack-poisoned]
b98ad74
to
6f0a65f
Compare
ghstack-source-id: 2a08dd2d97ac9ca734a8d4af55361ff1e825080f Pull Request resolved: #490
@ebsmothers has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
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 don't personally agree with this diff. If these modules can live as generic layers, then they should be under torchmultimodal/modules/layers while if they're just specific to ADM then they should be under adm_unet. I think we should keep the diffusion folders as focused on diffusion as possible and try to keep out other things.
@pbontrager I guess there are three possible places for these components: diffusion_labs/models/adm_unet/..., diffusion_labs/modules/..., and torchmultimodal/modules/.... I agree that the first location should be for components specific to ADM UNet. The second should be for more generic diffusion components (i.e. not tied to ADM specifically), while components in the third location should have use for other non-diffusion cases. Based on those conditions I think it should be either option (1) or (2), since I'm not aware of any models outside of diffusion_labs that would use these components. @abhinavarora mentioned that there are other diffusion models that can benefit from these components which is why I opened this PR. But if that's not the case, we can just close this and leave them where they are. Let me know what both of you think here. |
I believe they should stay with adm_unet until they start being reused as they may require modifications at that time. At that time I think they should be moved to option (3) because, while the architecture is being used for diffusion training, neural networks are still pretty generic for all types of training. I'm open to discussing this further though. |
My understanding is that these components are specific implementations of general concepts that have been popularized by prominent diffusion researchers (OpenAI, Stability, etc). I don't see them being used in any other models outside of those that build their code on top of OpenAI and StabilityAI repos. For example, this implementation of resnet blocks is quite different from the generic ones found in TorchVision. Hence in my opinion, only option 1) and 2) make sense. To me option 2) makes more sense because components like |
Differential Revision: [D50288362](https://our.internmc.facebook.com/intern/diff/D50288362) [ghstack-poisoned]
ghstack-source-id: c6516a8e206a977bdf635d1febd466f7d6c08af1 Pull Request resolved: #490
Differential Revision: [D50288362](https://our.internmc.facebook.com/intern/diff/D50288362) [ghstack-poisoned]
ghstack-source-id: b9ab08988a1272c658b37b4dcf1cddf48cc20270 Pull Request resolved: #490
@ebsmothers has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Differential Revision: [D50288362](https://our.internmc.facebook.com/intern/diff/D50288362) [ghstack-poisoned]
ghstack-source-id: f3a215b00331a35b0c5d05d26288feb5b37232ec Pull Request resolved: #490
@ebsmothers has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Closing this since we are not planning to land these changes right now |
Stack from ghstack (oldest at bottom):
Differential Revision: D50288362