rectified-flow-pytorch icon indicating copy to clipboard operation
rectified-flow-pytorch copied to clipboard

About two ema in Trainer class

Open derow0208 opened this issue 8 months ago • 0 comments

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?

derow0208 avatar Mar 18 '25 13:03 derow0208