Skip to content

Commit

Permalink
[PNDM Scheduler] Make sure list cannot grow forever (huggingface#882)
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickvonplaten authored Oct 20, 2022
1 parent 83f8a5f commit 4a76e5d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/diffusers/schedulers/scheduling_pndm.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ def step_plms(
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
Expand Down

0 comments on commit 4a76e5d

Please sign in to comment.