asd
This commit is contained in:
parent
ef15a39841
commit
9191201f05
|
@ -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()))
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user