mindspore-lab / mindone

one for all, Optimal generator with No Exception
https://mindspore-lab.github.io/mindone/
Apache License 2.0
353 stars 67 forks source link

feat(diffusers/models): add models like autoencoders, transformers, unets and etc. #523

Closed townwish4git closed 3 months ago

townwish4git commented 3 months ago

What does this PR do?

Adds # (feature)

implements of models in mindone.diffusers.models, include:

Model

AutoEncoders

UNets

Transformers

supplement: https://gist.github.com/Cui-yshoho/7ff86a76323c37f1c197d7fef67702ec

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.

@xxx

townwish4git commented 3 months ago

yushi,huiyu合入后,rebase, resolve conflict

done.

townwish4git commented 3 months ago

use magic number 0.797885 to replace math.sqrt(2.0 / math.pi), passed ut on cpu in {fp16, fp32} x {pynative, graph} with almost same results comparing to pytorch