From 9191201f055cb45163232f3db7d27161fb1a529a Mon Sep 17 00:00:00 2001 From: James Betker Date: Tue, 7 Dec 2021 09:55:39 -0700 Subject: [PATCH] asd --- codes/trainer/injectors/gaussian_diffusion_injector.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/codes/trainer/injectors/gaussian_diffusion_injector.py b/codes/trainer/injectors/gaussian_diffusion_injector.py index f5f861c2..af6ff70e 100644 --- a/codes/trainer/injectors/gaussian_diffusion_injector.py +++ b/codes/trainer/injectors/gaussian_diffusion_injector.py @@ -31,7 +31,7 @@ class GaussianDiffusionInjector(Injector): hq = state[self.input] # In eval mode, seed torch with a deterministic seed for reproducibility. - if not gen.training(): + if not gen.training: torch.manual_seed(0) random.seed(0) @@ -51,7 +51,7 @@ class GaussianDiffusionInjector(Injector): self.output_x_start_key: diffusion_outputs['x_start_predicted']}) # Absolutely critical to undo the above seed. - if not gen.training(): + if not gen.training: torch.manual_seed(int(time.time())) random.seed(int(time.time()))