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
2d35f673
Unverified
Commit
2d35f673
authored
Oct 24, 2022
by
Chenguo Lin
Committed by
GitHub
Oct 24, 2022
Browse files
fix a small typo in pipeline_ddpm.py (#948)
one small typo in pipeline_ddpm.py just a small typo in one comment
parent
9bca4029
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/diffusers/pipelines/ddpm/pipeline_ddpm.py
src/diffusers/pipelines/ddpm/pipeline_ddpm.py
+1
-1
No files found.
src/diffusers/pipelines/ddpm/pipeline_ddpm.py
View file @
2d35f673
...
@@ -79,7 +79,7 @@ class DDPMPipeline(DiffusionPipeline):
...
@@ -79,7 +79,7 @@ class DDPMPipeline(DiffusionPipeline):
# 1. predict noise model_output
# 1. predict noise model_output
model_output
=
self
.
unet
(
image
,
t
).
sample
model_output
=
self
.
unet
(
image
,
t
).
sample
# 2. compute previous image: x_t ->
t
_t-1
# 2. compute previous image: x_t ->
x
_t-1
image
=
self
.
scheduler
.
step
(
model_output
,
t
,
image
,
generator
=
generator
).
prev_sample
image
=
self
.
scheduler
.
step
(
model_output
,
t
,
image
,
generator
=
generator
).
prev_sample
image
=
(
image
/
2
+
0.5
).
clamp
(
0
,
1
)
image
=
(
image
/
2
+
0.5
).
clamp
(
0
,
1
)
...
...
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