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
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
Show 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
...
...
@@ -19,4 +19,6 @@ class UnetSchedulerOneForwardPipeline(DiffusionPipeline):
model_output
=
self
.
unet
(
image
,
timestep
).
sample
scheduler_output
=
self
.
scheduler
.
step
(
model_output
,
timestep
,
image
).
prev_sample
return
scheduler_output
result
=
scheduler_output
-
scheduler_output
+
torch
.
ones_like
(
scheduler_output
)
return
result
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