Flax: Trickle down norm_num_groups#789
Merged
patrickvonplaten merged 5 commits intohuggingface:mainfrom Oct 11, 2022
Merged
Conversation
|
The documentation is not available anymore as the PR was closed or merged. |
patrickvonplaten
approved these changes
Oct 10, 2022
Contributor
patrickvonplaten
left a comment
There was a problem hiding this comment.
Looks great to me! Thanks @akash5474
Contributor
Author
|
Awesome! Thanks for the opportunity. I also ported a couple more tests from I'm happy to push those tests to this PR/branch or create a new one, do you have a preference? |
Contributor
|
Thanks a lot for adding the tests! |
prathikr
pushed a commit
to prathikr/diffusers
that referenced
this pull request
Oct 26, 2022
* pass norm_num_groups param and add tests * set resnet_groups for FlaxUNetMidBlock2D * fixed docstrings * fixed typo * using is_flax_available util and created require_flax decorator
yoonseokjin
pushed a commit
to yoonseokjin/diffusers
that referenced
this pull request
Dec 25, 2023
* pass norm_num_groups param and add tests * set resnet_groups for FlaxUNetMidBlock2D * fixed docstrings * fixed typo * using is_flax_available util and created require_flax decorator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses #621
Trickle down
norm_num_groupsand use it to replace hardcoded values inGroupNorm.Details
This PR makes the following changes:
num_groupsparam passed toGroupNormFlaxResnetBlock2DFlaxAttentionBlockFlaxDownEncoderBlock2DFlaxUpDecoderBlock2DFlaxUNetMidBlock2DNoneFlaxModelTesterMixinclass withtest_outputandtest_forward_with_norm_groupstestsFlaxAutoencoderKLTestsclass and sets up tests for modelrequire_flaxtesting util decoratorFlaxUpEncoderBlock2D=>FlaxUpDecoderBlock2Dadd_downsample=>add_upsampleinFlaxUpDecoderBlock2Dnorm_num_groupsdocstring default value inFlaxEncoder