Skip to content

Commit 4a76e5d

Browse files
[PNDM Scheduler] Make sure list cannot grow forever (huggingface#882)
1 parent 83f8a5f commit 4a76e5d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/diffusers/schedulers/scheduling_pndm.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,7 @@ def step_plms(
310310
prev_timestep = timestep - self.config.num_train_timesteps // self.num_inference_steps
311311

312312
if self.counter != 1:
313+
self.ets = self.ets[-3:]
313314
self.ets.append(model_output)
314315
else:
315316
prev_timestep = timestep

0 commit comments

Comments
 (0)