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
1b6c7ea7
Unverified
Commit
1b6c7ea7
authored
Dec 01, 2023
by
YiYi Xu
Committed by
GitHub
Dec 01, 2023
Browse files
[schedulers] create `self.sigmas` during __init__ (#6006)
* fix dpm * all scheulers
parent
b41f809a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
0 deletions
+5
-0
src/diffusers/schedulers/scheduling_deis_multistep.py
src/diffusers/schedulers/scheduling_deis_multistep.py
+1
-0
src/diffusers/schedulers/scheduling_dpmsolver_multistep.py
src/diffusers/schedulers/scheduling_dpmsolver_multistep.py
+1
-0
src/diffusers/schedulers/scheduling_dpmsolver_multistep_inverse.py
...sers/schedulers/scheduling_dpmsolver_multistep_inverse.py
+1
-0
src/diffusers/schedulers/scheduling_dpmsolver_singlestep.py
src/diffusers/schedulers/scheduling_dpmsolver_singlestep.py
+1
-0
src/diffusers/schedulers/scheduling_unipc_multistep.py
src/diffusers/schedulers/scheduling_unipc_multistep.py
+1
-0
No files found.
src/diffusers/schedulers/scheduling_deis_multistep.py
View file @
1b6c7ea7
...
@@ -162,6 +162,7 @@ class DEISMultistepScheduler(SchedulerMixin, ConfigMixin):
...
@@ -162,6 +162,7 @@ class DEISMultistepScheduler(SchedulerMixin, ConfigMixin):
self
.
alpha_t
=
torch
.
sqrt
(
self
.
alphas_cumprod
)
self
.
alpha_t
=
torch
.
sqrt
(
self
.
alphas_cumprod
)
self
.
sigma_t
=
torch
.
sqrt
(
1
-
self
.
alphas_cumprod
)
self
.
sigma_t
=
torch
.
sqrt
(
1
-
self
.
alphas_cumprod
)
self
.
lambda_t
=
torch
.
log
(
self
.
alpha_t
)
-
torch
.
log
(
self
.
sigma_t
)
self
.
lambda_t
=
torch
.
log
(
self
.
alpha_t
)
-
torch
.
log
(
self
.
sigma_t
)
self
.
sigmas
=
((
1
-
self
.
alphas_cumprod
)
/
self
.
alphas_cumprod
)
**
0.5
# standard deviation of the initial noise distribution
# standard deviation of the initial noise distribution
self
.
init_noise_sigma
=
1.0
self
.
init_noise_sigma
=
1.0
...
...
src/diffusers/schedulers/scheduling_dpmsolver_multistep.py
View file @
1b6c7ea7
...
@@ -189,6 +189,7 @@ class DPMSolverMultistepScheduler(SchedulerMixin, ConfigMixin):
...
@@ -189,6 +189,7 @@ class DPMSolverMultistepScheduler(SchedulerMixin, ConfigMixin):
self
.
alpha_t
=
torch
.
sqrt
(
self
.
alphas_cumprod
)
self
.
alpha_t
=
torch
.
sqrt
(
self
.
alphas_cumprod
)
self
.
sigma_t
=
torch
.
sqrt
(
1
-
self
.
alphas_cumprod
)
self
.
sigma_t
=
torch
.
sqrt
(
1
-
self
.
alphas_cumprod
)
self
.
lambda_t
=
torch
.
log
(
self
.
alpha_t
)
-
torch
.
log
(
self
.
sigma_t
)
self
.
lambda_t
=
torch
.
log
(
self
.
alpha_t
)
-
torch
.
log
(
self
.
sigma_t
)
self
.
sigmas
=
((
1
-
self
.
alphas_cumprod
)
/
self
.
alphas_cumprod
)
**
0.5
# standard deviation of the initial noise distribution
# standard deviation of the initial noise distribution
self
.
init_noise_sigma
=
1.0
self
.
init_noise_sigma
=
1.0
...
...
src/diffusers/schedulers/scheduling_dpmsolver_multistep_inverse.py
View file @
1b6c7ea7
...
@@ -184,6 +184,7 @@ class DPMSolverMultistepInverseScheduler(SchedulerMixin, ConfigMixin):
...
@@ -184,6 +184,7 @@ class DPMSolverMultistepInverseScheduler(SchedulerMixin, ConfigMixin):
self
.
alpha_t
=
torch
.
sqrt
(
self
.
alphas_cumprod
)
self
.
alpha_t
=
torch
.
sqrt
(
self
.
alphas_cumprod
)
self
.
sigma_t
=
torch
.
sqrt
(
1
-
self
.
alphas_cumprod
)
self
.
sigma_t
=
torch
.
sqrt
(
1
-
self
.
alphas_cumprod
)
self
.
lambda_t
=
torch
.
log
(
self
.
alpha_t
)
-
torch
.
log
(
self
.
sigma_t
)
self
.
lambda_t
=
torch
.
log
(
self
.
alpha_t
)
-
torch
.
log
(
self
.
sigma_t
)
self
.
sigmas
=
((
1
-
self
.
alphas_cumprod
)
/
self
.
alphas_cumprod
)
**
0.5
# standard deviation of the initial noise distribution
# standard deviation of the initial noise distribution
self
.
init_noise_sigma
=
1.0
self
.
init_noise_sigma
=
1.0
...
...
src/diffusers/schedulers/scheduling_dpmsolver_singlestep.py
View file @
1b6c7ea7
...
@@ -172,6 +172,7 @@ class DPMSolverSinglestepScheduler(SchedulerMixin, ConfigMixin):
...
@@ -172,6 +172,7 @@ class DPMSolverSinglestepScheduler(SchedulerMixin, ConfigMixin):
self
.
alpha_t
=
torch
.
sqrt
(
self
.
alphas_cumprod
)
self
.
alpha_t
=
torch
.
sqrt
(
self
.
alphas_cumprod
)
self
.
sigma_t
=
torch
.
sqrt
(
1
-
self
.
alphas_cumprod
)
self
.
sigma_t
=
torch
.
sqrt
(
1
-
self
.
alphas_cumprod
)
self
.
lambda_t
=
torch
.
log
(
self
.
alpha_t
)
-
torch
.
log
(
self
.
sigma_t
)
self
.
lambda_t
=
torch
.
log
(
self
.
alpha_t
)
-
torch
.
log
(
self
.
sigma_t
)
self
.
sigmas
=
((
1
-
self
.
alphas_cumprod
)
/
self
.
alphas_cumprod
)
**
0.5
# standard deviation of the initial noise distribution
# standard deviation of the initial noise distribution
self
.
init_noise_sigma
=
1.0
self
.
init_noise_sigma
=
1.0
...
...
src/diffusers/schedulers/scheduling_unipc_multistep.py
View file @
1b6c7ea7
...
@@ -175,6 +175,7 @@ class UniPCMultistepScheduler(SchedulerMixin, ConfigMixin):
...
@@ -175,6 +175,7 @@ class UniPCMultistepScheduler(SchedulerMixin, ConfigMixin):
self
.
alpha_t
=
torch
.
sqrt
(
self
.
alphas_cumprod
)
self
.
alpha_t
=
torch
.
sqrt
(
self
.
alphas_cumprod
)
self
.
sigma_t
=
torch
.
sqrt
(
1
-
self
.
alphas_cumprod
)
self
.
sigma_t
=
torch
.
sqrt
(
1
-
self
.
alphas_cumprod
)
self
.
lambda_t
=
torch
.
log
(
self
.
alpha_t
)
-
torch
.
log
(
self
.
sigma_t
)
self
.
lambda_t
=
torch
.
log
(
self
.
alpha_t
)
-
torch
.
log
(
self
.
sigma_t
)
self
.
sigmas
=
((
1
-
self
.
alphas_cumprod
)
/
self
.
alphas_cumprod
)
**
0.5
# standard deviation of the initial noise distribution
# standard deviation of the initial noise distribution
self
.
init_noise_sigma
=
1.0
self
.
init_noise_sigma
=
1.0
...
...
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