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
162035e9
Commit
162035e9
authored
Jun 10, 2022
by
patil-suraj
Browse files
Merge branch 'main' of
https://github.com/huggingface/diffusers
into main
parents
7bb3dcd1
35c4d01d
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 @
162035e9
...
...
@@ -48,7 +48,7 @@ noise_scheduler = GaussianDDPMScheduler.from_config("fusing/ddpm-lsun-church")
unet
=
UNetModel
.
from_pretrained
(
"fusing/ddpm-lsun-church"
).
to
(
torch_device
)
# 2. Sample gaussian noise
image
=
noise_scheduler
.
sample_noise
((
1
,
model
.
in_channels
,
model
.
resolution
,
model
.
resolution
),
device
=
torch_device
,
generator
=
generator
)
image
=
noise_scheduler
.
sample_noise
((
1
,
unet
.
in_channels
,
unet
.
resolution
,
unet
.
resolution
),
device
=
torch_device
,
generator
=
generator
)
# 3. Denoise
num_prediction_steps
=
len
(
noise_scheduler
)
...
...
@@ -96,7 +96,7 @@ noise_scheduler = DDIMScheduler.from_config("fusing/ddpm-celeba-hq")
unet
=
UNetModel
.
from_pretrained
(
"fusing/ddpm-celeba-hq"
).
to
(
torch_device
)
# 2. Sample gaussian noise
image
=
noise_scheduler
.
sample_noise
((
1
,
model
.
in_channels
,
model
.
resolution
,
model
.
resolution
),
device
=
torch_device
,
generator
=
generator
)
image
=
noise_scheduler
.
sample_noise
((
1
,
unet
.
in_channels
,
unet
.
resolution
,
unet
.
resolution
),
device
=
torch_device
,
generator
=
generator
)
# 3. Denoise
num_inference_steps
=
50
...
...
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