Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chenpangpang
diffusers
Commits
4a76e5d4
Unverified
Commit
4a76e5d4
authored
Oct 20, 2022
by
Patrick von Platen
Committed by
GitHub
Oct 20, 2022
Browse files
[PNDM Scheduler] Make sure list cannot grow forever (#882)
parent
83f8a5ff
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
src/diffusers/schedulers/scheduling_pndm.py
src/diffusers/schedulers/scheduling_pndm.py
+1
-0
No files found.
src/diffusers/schedulers/scheduling_pndm.py
View file @
4a76e5d4
...
@@ -310,6 +310,7 @@ class PNDMScheduler(SchedulerMixin, ConfigMixin):
...
@@ -310,6 +310,7 @@ class PNDMScheduler(SchedulerMixin, ConfigMixin):
prev_timestep
=
timestep
-
self
.
config
.
num_train_timesteps
//
self
.
num_inference_steps
prev_timestep
=
timestep
-
self
.
config
.
num_train_timesteps
//
self
.
num_inference_steps
if
self
.
counter
!=
1
:
if
self
.
counter
!=
1
:
self
.
ets
=
self
.
ets
[
-
3
:]
self
.
ets
.
append
(
model_output
)
self
.
ets
.
append
(
model_output
)
else
:
else
:
prev_timestep
=
timestep
prev_timestep
=
timestep
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment