mirror of
https://github.com/huggingface/diffusers.git
synced 2026-01-27 17:22:53 +03:00
[PNDM Scheduler] Make sure list cannot grow forever (#882)
This commit is contained in:
committed by
GitHub
parent
83f8a5ff70
commit
4a76e5d49b
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user