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
8fdecfab
Commit
8fdecfab
authored
Jun 15, 2022
by
patil-suraj
Browse files
fix noise device
parent
cdb3c493
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/diffusers/pipelines/pipeline_latent_diffusion.py
src/diffusers/pipelines/pipeline_latent_diffusion.py
+1
-1
No files found.
src/diffusers/pipelines/pipeline_latent_diffusion.py
View file @
8fdecfab
...
@@ -943,7 +943,7 @@ class LatentDiffusion(DiffusionPipeline):
...
@@ -943,7 +943,7 @@ class LatentDiffusion(DiffusionPipeline):
# 3. optionally sample variance
# 3. optionally sample variance
variance
=
0
variance
=
0
if
eta
>
0
:
if
eta
>
0
:
noise
=
torch
.
randn
(
image
.
shape
,
generator
=
generator
,
device
=
image
.
device
)
noise
=
torch
.
randn
(
image
.
shape
,
generator
=
generator
)
to
(
image
.
device
)
variance
=
self
.
noise_scheduler
.
get_variance
(
t
,
num_inference_steps
).
sqrt
()
*
eta
*
noise
variance
=
self
.
noise_scheduler
.
get_variance
(
t
,
num_inference_steps
).
sqrt
()
*
eta
*
noise
# 4. set current image to prev_image: x_t -> x_t-1
# 4. set current image to prev_image: x_t -> x_t-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