pass ddim_eta and ddim_discretize

This commit is contained in:
DepFA 2022-09-26 08:02:15 +01:00 committed by AUTOMATIC1111
parent 619668ccfe
commit ed5736139c
1 changed files with 2 additions and 2 deletions

View File

@ -120,9 +120,9 @@ class VanillaStableDiffusionSampler:
# existing code fails with cetain step counts, like 9
try:
self.sampler.make_schedule(ddim_num_steps=steps, verbose=False)
self.sampler.make_schedule(ddim_num_steps=steps, ddim_eta=opts.ddim_eta, ddim_discretize=opts.ddim_discretize, verbose=False)
except Exception:
self.sampler.make_schedule(ddim_num_steps=steps+1, verbose=False)
self.sampler.make_schedule(ddim_num_steps=steps+1,ddim_eta=opts.ddim_eta, ddim_discretize=opts.ddim_discretize, verbose=False)
x1 = self.sampler.stochastic_encode(x, torch.tensor([t_enc] * int(x.shape[0])).to(shared.device), noise=noise)