rectified-flow-pytorch
rectified-flow-pytorch copied to clipboard
About two ema in Trainer class
Thanks for your excellent code!
I'm a bit confused about some of the code in the rectified_flow.py file
What's the difference between these two ema model?
if getattr(self.model, 'use_consistency', False):
self.model.ema_model.update()
if self.is_main and self.use_ema:
self.ema_model.ema_model.data_shape = self.model.data_shape
self.ema_model.update()
What are their respective functions?