Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
renzhc
diffusers_dcu
Commits
384fcac6
Unverified
Commit
384fcac6
authored
Aug 31, 2022
by
Patrick von Platen
Committed by
GitHub
Aug 31, 2022
Browse files
[Stable Diffusion] Hotfix (#299)
parent
0b1a843d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
src/diffusers/schedulers/scheduling_pndm.py
src/diffusers/schedulers/scheduling_pndm.py
+3
-1
No files found.
src/diffusers/schedulers/scheduling_pndm.py
View file @
384fcac6
...
...
@@ -110,7 +110,9 @@ class PNDMScheduler(SchedulerMixin, ConfigMixin):
# produce better results. When using PNDM with `self.config.skip_prk_steps` the implementation
# is based on crowsonkb's PLMS sampler implementation: https://github.com/CompVis/latent-diffusion/pull/51
self
.
prk_timesteps
=
np
.
array
([])
self
.
plms_timesteps
=
(
self
.
_timesteps
[:
-
1
]
+
self
.
_timesteps
[
-
2
:
-
1
]
+
self
.
_timesteps
[
-
1
:])[::
-
1
].
copy
()
self
.
plms_timesteps
=
np
.
concatenate
([
self
.
_timesteps
[:
-
1
],
self
.
_timesteps
[
-
2
:
-
1
],
self
.
_timesteps
[
-
1
:]])[
::
-
1
].
copy
()
else
:
prk_timesteps
=
np
.
array
(
self
.
_timesteps
[
-
self
.
pndm_order
:]).
repeat
(
2
)
+
np
.
tile
(
np
.
array
([
0
,
self
.
config
.
num_train_timesteps
//
num_inference_steps
//
2
]),
self
.
pndm_order
...
...
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