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
OpenDAS
diffusers
Commits
e62dd5cf
Unverified
Commit
e62dd5cf
authored
Dec 13, 2022
by
Patrick von Platen
Committed by
GitHub
Dec 13, 2022
Browse files
Change one-step dummy pipeline for testing (#1690)
Change the one-step dummy pipeline for testing
parent
07f95503
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
examples/community/one_step_unet.py
examples/community/one_step_unet.py
+3
-1
No files found.
examples/community/one_step_unet.py
View file @
e62dd5cf
...
@@ -18,5 +18,7 @@ class UnetSchedulerOneForwardPipeline(DiffusionPipeline):
...
@@ -18,5 +18,7 @@ class UnetSchedulerOneForwardPipeline(DiffusionPipeline):
model_output
=
self
.
unet
(
image
,
timestep
).
sample
model_output
=
self
.
unet
(
image
,
timestep
).
sample
scheduler_output
=
self
.
scheduler
.
step
(
model_output
,
timestep
,
image
).
prev_sample
scheduler_output
=
self
.
scheduler
.
step
(
model_output
,
timestep
,
image
).
prev_sample
result
=
scheduler_output
-
scheduler_output
+
torch
.
ones_like
(
scheduler_output
)
return
scheduler_outpu
t
return
resul
t
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