mindspore-lab / mindone

one for all, Optimal generator with No Exception
Apache License 2.0
328 stars 62 forks source link

refactor(diffusers/layers): layer&group norm #542

Closed townwish4git closed 1 week ago

townwish4git commented 2 weeks ago

What does this PR do?

  1. Add name for parameters defined by mindspore.Parameter() to make sure param.set_dtype() works just right, so we won't have to cast it manually
  2. Change the parameter order of LayerNorm.__init__() to maintain consistency with torch.

Before submitting

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.

@geniuspatrick @CaitinZhao