-
Notifications
You must be signed in to change notification settings - Fork 6.2k
[tests] Speed up AnimateDiff test #7707
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
@@ -1493,7 +1492,7 @@ def __init__( | |||
TransformerTemporalModel( | |||
num_attention_heads=temporal_num_attention_heads, | |||
in_channels=out_channels, | |||
norm_num_groups=temporal_norm_num_groups, | |||
norm_num_groups=resnet_groups, |
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.
This is because in DownBlockMotion, we make use of resnet_groups
too and temporal_norm_num_groups
does not seem to be present there. I think this is correct but not too sure. Not doing this causes multiple errors with the group norm in_channels being indivisible by num_groups. There is no control over temporal_norm_num_groups
parameter because it is not present in get_up_block()
. Everywhere else that passes norm_num_groups into TemporalTransformerModel does what is present here.
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.
Let's not touch the default values here please especially when we're not too sure. Will defer to @DN6 to verify.
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 this change should be safe. I think it was a mistake here passing in temporal_norm_num_groups
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.
awesome! What are your thoughts on the first failing test after these changes? If I make any changes there, multiple other tests are most likely going to break. We are trying to load hf-internal-testing/tiny-stable-diffusion-pipe weights into a different model definition due to the changes in unet causing weight mismatch...
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.
That's okay. We can make a change to that model repo or change the test specifically for animatediff.
Hi @sayakpaul @DN6, some updates on the failing tests.
This fails in both old and new version of tests and I believe it is somewhat device dependent. I tested on different diffusers checkouts but seems like it always fails locally for me but not on CI.
This test might need some rework because it assumes that the underlying model is the same as |
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.
The changes look good to me. But let's maybe not change the default value when we're not too sure.
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. |
What does this PR do?
Part of #7677
Before:
After:
Errors before these changes:
Errors after these changes (need help fixing):
Who 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.
@sayakpaul