[Utils] Adds `store()` and `restore()` methods to EMAModel (#2302)
* add store and restore() methods to EMAModel.
* Update src/diffusers/training_utils.py
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
* make style with doc builder
* remove explicit listing.
* Apply suggestions from code review
Co-authored-by: Will Berman <wlbberman@gmail.com>
* Apply suggestions from code review
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
* chore: better variable naming.
* better treatment of temp_stored_params
Co-authored-by: patil-suraj <surajp815@gmail.com>
* make style
* remove temporary params from earth 🌎
* make fix-copies.
---------
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
Co-authored-by: Will Berman <wlbberman@gmail.com>
Co-authored-by: patil-suraj <surajp815@gmail.com>