Skip to content

Commit

Permalink
Merge pull request Sygil-Dev#21 from bzantium/hotfix/when-not-use-ema
Browse files Browse the repository at this point in the history
hotfix: add use_ema condition for extracting ema_vae in train_step
  • Loading branch information
lucidrains authored Feb 5, 2023
2 parents 932087b + 2585eef commit d301298
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion muse_maskgit_pytorch/trainers.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,8 @@ def train_step(self):

self.vae.train()
discr = self.vae.module.discr if self.is_distributed else self.vae.discr
ema_vae = self.ema_vae.module if self.is_distributed else self.ema_vae
if self.use_ema:
ema_vae = self.ema_vae.module if self.is_distributed else self.ema_vae

# logs

Expand Down

0 comments on commit d301298

Please sign in to comment.