Skip to content
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

Question about why used diffusions.Transformer2DModel for parent instead of nn.Modules? #14

Closed
97KangSH opened this issue Dec 5, 2024 · 2 comments

Comments

@97KangSH
Copy link

97KangSH commented Dec 5, 2024

Dear Author,

I’m curious about the design choice of using Transformer2DModel as the parent class for Mamba2DModel.

Are there specific benefits to this approach that I might not be aware of? I find it a bit confusing since the model is called Mamba but heavily relies on Transformer components.

Looking forward to your clarification.

Thanks!

@tyshiwo1
Copy link
Owner

Thank you for your appreciation.

This is because Transformer2DModel in diffusers corresponds to the diffusion transformer (DiTs) models.
When I developed DiM, I wanted to leverage or ablate the modules in DiTs for convenience (such as various Normalization types), so I chose Transformer2DModel in diffusers as the parent class for Mamba2DModel.
In the final version of DiM, a lot of modules were modified but the parent class was kept.

@97KangSH
Copy link
Author

Thank you for your response.
It resolved my question.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants