Commit 34c86c12 authored by Martin Cairns's avatar Martin Cairns

Include PLMS in adjust steps as it also can fail in the same way

parent de1dc0d2
...@@ -208,7 +208,7 @@ class VanillaStableDiffusionSampler: ...@@ -208,7 +208,7 @@ class VanillaStableDiffusionSampler:
def adjust_steps_if_invalid(self, p, num_steps): def adjust_steps_if_invalid(self, p, num_steps):
if self.config.name == 'DDIM' and p.ddim_discretize == 'uniform': if (self.config.name == 'DDIM' and p.ddim_discretize == 'uniform') or (self.config.name == 'PLMS'):
valid_step = 999 / (1000 // num_steps) valid_step = 999 / (1000 // num_steps)
if valid_step == floor(valid_step): if valid_step == floor(valid_step):
return int(valid_step) + 1 return int(valid_step) + 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment