Commit 9ae9059
Replacing the nn.Mish activation function with a get_activation function. (huggingface#5651)
* I added a new doc string to the class. This is more flexible to understanding other developers what are doing and where it's using.
* Update src/diffusers/models/unet_2d_blocks.py
This changes suggest by maintener.
Co-authored-by: Sayak Paul <[email protected]>
* Update src/diffusers/models/unet_2d_blocks.py
Add suggested text
Co-authored-by: Sayak Paul <[email protected]>
* Update unet_2d_blocks.py
I changed the Parameter to Args text.
* Update unet_2d_blocks.py
proper indentation set in this file.
* Update unet_2d_blocks.py
a little bit of change in the act_fun argument line.
* I run the black command to reformat style in the code
* Update unet_2d_blocks.py
similar doc-string add to have in the original diffusion repository.
* I removed the dummy variable defined in both the encoder and decoder.
* Now, I run black package to reformat my file
* Remove the redundant line from the adapter.py file.
* Black package using to reformated my file
* Replacing the nn.Mish activation function with a get_activation function allows developers to more easily choose the right activation function for their task. Additionally, removing redundant variables can improve code readability and maintainability.
* I try to fix this: Fast tests for PRs / Fast PyTorch Models & Schedulers CPU tests (pull_request)
* Update src/diffusers/models/resnet.py
Co-authored-by: YiYi Xu <[email protected]>
---------
Co-authored-by: Sayak Paul <[email protected]>
Co-authored-by: Dhruv Nair <[email protected]>
Co-authored-by: YiYi Xu <[email protected]>1 parent 7942bb8 commit 9ae9059
2 files changed
+18
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
778 | 778 | | |
779 | 779 | | |
780 | 780 | | |
| 781 | + | |
781 | 782 | | |
782 | 783 | | |
783 | 784 | | |
784 | | - | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
785 | 791 | | |
786 | 792 | | |
787 | 793 | | |
788 | 794 | | |
789 | 795 | | |
790 | | - | |
| 796 | + | |
791 | 797 | | |
792 | 798 | | |
793 | 799 | | |
| |||
808 | 814 | | |
809 | 815 | | |
810 | 816 | | |
| 817 | + | |
811 | 818 | | |
812 | 819 | | |
813 | 820 | | |
814 | | - | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
815 | 827 | | |
816 | 828 | | |
817 | 829 | | |
818 | 830 | | |
819 | 831 | | |
820 | | - | |
| 832 | + | |
821 | 833 | | |
822 | 834 | | |
823 | 835 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
165 | | - | |
166 | | - | |
| 165 | + | |
| 166 | + | |
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
| |||
0 commit comments