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
acd87ae0
Unverified
Commit
acd87ae0
authored
Jun 07, 2022
by
Suraj Patil
Committed by
GitHub
Jun 07, 2022
Browse files
update pipeline example
parent
28ba0ffa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
README.md
README.md
+2
-2
No files found.
README.md
View file @
acd87ae0
...
@@ -84,12 +84,12 @@ image_pil.save("test.png")
...
@@ -84,12 +84,12 @@ image_pil.save("test.png")
Example:
Example:
```
python
```
python
from
modeling_ddpm
import
DDPM
from
diffusers
import
DiffusionPipeline
import
PIL.Image
import
PIL.Image
import
numpy
as
np
import
numpy
as
np
# load model and scheduler
# load model and scheduler
ddpm
=
D
DPM
.
from_pretrained
(
"fusing/ddpm-lsun-bedroom
-pipe
"
)
ddpm
=
D
iffusionPipeline
.
from_pretrained
(
"fusing/ddpm-lsun-bedroom"
)
# run pipeline in inference (sample random noise and denoise)
# run pipeline in inference (sample random noise and denoise)
image
=
ddpm
()
image
=
ddpm
()
...
...
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