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
3d335f83
Unverified
Commit
3d335f83
authored
Jun 15, 2022
by
Suraj Patil
Committed by
GitHub
Jun 15, 2022
Browse files
Update README.md
parent
57a70b80
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 @
3d335f83
...
@@ -195,11 +195,11 @@ model = UNetModel.from_pretrained(model_id)
...
@@ -195,11 +195,11 @@ model = UNetModel.from_pretrained(model_id)
scheduler
=
PNDMScheduler
()
scheduler
=
PNDMScheduler
()
# load model and scheduler
# load model and scheduler
ddp
m
=
PNDM
(
unet
=
model
,
noise_scheduler
=
scheduler
)
pnd
m
=
PNDM
(
unet
=
model
,
noise_scheduler
=
scheduler
)
# run pipeline in inference (sample random noise and denoise)
# run pipeline in inference (sample random noise and denoise)
with
torch
.
no_grad
():
with
torch
.
no_grad
():
image
=
ddp
m
()
image
=
pnd
m
()
# process image to PIL
# process image to PIL
image_processed
=
image
.
cpu
().
permute
(
0
,
2
,
3
,
1
)
image_processed
=
image
.
cpu
().
permute
(
0
,
2
,
3
,
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