Unverified Commit 4a76e5d4 authored by Patrick von Platen's avatar Patrick von Platen Committed by GitHub
Browse files

[PNDM Scheduler] Make sure list cannot grow forever (#882)

parent 83f8a5ff
......@@ -310,6 +310,7 @@ class PNDMScheduler(SchedulerMixin, ConfigMixin):
prev_timestep = timestep - self.config.num_train_timesteps // self.num_inference_steps
if self.counter != 1:
self.ets = self.ets[-3:]
self.ets.append(model_output)
else:
prev_timestep = timestep
......
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