-
Couldn't load subscription status.
- Fork 6.5k
refactor SD3, speedup tests #9169
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
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. |
|
@DN6 LMK your thoughts here. Will update the expected test slices after approval |
| self.inner_dim = num_attention_heads * attention_head_dim | ||
|
|
||
| self.pos_embed = PatchEmbed( | ||
| height=self.config.sample_size, |
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 think whether to use the config object inside models is more of a collective decision. We have it set up like this in a few places. Functionally, they are equivalent but we just need to commit to an approach. My personal preference is to use the variable directly as done here. cc: @yiyixuxu @sayakpaul
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.
Yeah using a variable directly is what I have been following recently as well. During the forward() if the variable is accessible through self.config that takes priority, but if not (such as inner_dim) just assign then to self during __init__().
|
Will update test slices which are needed due to making models smaller |
|
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread. Please note that issues that do not follow the contributing guidelines are likely to be ignored. |
|
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread. Please note that issues that do not follow the contributing guidelines are likely to be ignored. |
|
@a-r-r-o-w is this still relevant? |
|
@sayakpaul This is still relevant, yes. We were waiting for SD3.5 to be in when this went stale, so I will revive this soon as it's in now. |
What does this PR do?
__init__via the config attribute is not necessary or clean. Can use the parameters directlyWho can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.