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
3f421fe0
"git@developer.sourcefind.cn:OpenDAS/mmcv.git" did not exist on "70944a261d492c2b0b765ad009f78f3506ce0f16"
Unverified
Commit
3f421fe0
authored
Dec 16, 2024
by
hlky
Committed by
GitHub
Dec 16, 2024
Browse files
Fix `use_flow_sigmas` (#10242)
use_flow_sigmas copy
parent
a7d50524
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
6 additions
and
6 deletions
+6
-6
src/diffusers/schedulers/scheduling_deis_multistep.py
src/diffusers/schedulers/scheduling_deis_multistep.py
+1
-1
src/diffusers/schedulers/scheduling_dpmsolver_multistep.py
src/diffusers/schedulers/scheduling_dpmsolver_multistep.py
+1
-1
src/diffusers/schedulers/scheduling_dpmsolver_multistep_inverse.py
...sers/schedulers/scheduling_dpmsolver_multistep_inverse.py
+1
-1
src/diffusers/schedulers/scheduling_dpmsolver_singlestep.py
src/diffusers/schedulers/scheduling_dpmsolver_singlestep.py
+1
-1
src/diffusers/schedulers/scheduling_sasolver.py
src/diffusers/schedulers/scheduling_sasolver.py
+1
-1
src/diffusers/schedulers/scheduling_unipc_multistep.py
src/diffusers/schedulers/scheduling_unipc_multistep.py
+1
-1
No files found.
src/diffusers/schedulers/scheduling_deis_multistep.py
View file @
3f421fe0
...
@@ -287,7 +287,7 @@ class DEISMultistepScheduler(SchedulerMixin, ConfigMixin):
...
@@ -287,7 +287,7 @@ class DEISMultistepScheduler(SchedulerMixin, ConfigMixin):
elif
self
.
config
.
use_flow_sigmas
:
elif
self
.
config
.
use_flow_sigmas
:
alphas
=
np
.
linspace
(
1
,
1
/
self
.
config
.
num_train_timesteps
,
num_inference_steps
+
1
)
alphas
=
np
.
linspace
(
1
,
1
/
self
.
config
.
num_train_timesteps
,
num_inference_steps
+
1
)
sigmas
=
1.0
-
alphas
sigmas
=
1.0
-
alphas
sigmas
=
np
.
flip
(
self
.
config
.
flow_shift
*
sigmas
/
(
1
+
(
self
.
config
.
flow_shift
-
1
)
*
sigmas
))[:
-
1
]
sigmas
=
np
.
flip
(
self
.
config
.
flow_shift
*
sigmas
/
(
1
+
(
self
.
config
.
flow_shift
-
1
)
*
sigmas
))[:
-
1
]
.
copy
()
timesteps
=
(
sigmas
*
self
.
config
.
num_train_timesteps
).
copy
()
timesteps
=
(
sigmas
*
self
.
config
.
num_train_timesteps
).
copy
()
else
:
else
:
sigmas
=
np
.
interp
(
timesteps
,
np
.
arange
(
0
,
len
(
sigmas
)),
sigmas
)
sigmas
=
np
.
interp
(
timesteps
,
np
.
arange
(
0
,
len
(
sigmas
)),
sigmas
)
...
...
src/diffusers/schedulers/scheduling_dpmsolver_multistep.py
View file @
3f421fe0
...
@@ -412,7 +412,7 @@ class DPMSolverMultistepScheduler(SchedulerMixin, ConfigMixin):
...
@@ -412,7 +412,7 @@ class DPMSolverMultistepScheduler(SchedulerMixin, ConfigMixin):
elif
self
.
config
.
use_flow_sigmas
:
elif
self
.
config
.
use_flow_sigmas
:
alphas
=
np
.
linspace
(
1
,
1
/
self
.
config
.
num_train_timesteps
,
num_inference_steps
+
1
)
alphas
=
np
.
linspace
(
1
,
1
/
self
.
config
.
num_train_timesteps
,
num_inference_steps
+
1
)
sigmas
=
1.0
-
alphas
sigmas
=
1.0
-
alphas
sigmas
=
np
.
flip
(
self
.
config
.
flow_shift
*
sigmas
/
(
1
+
(
self
.
config
.
flow_shift
-
1
)
*
sigmas
))[:
-
1
]
sigmas
=
np
.
flip
(
self
.
config
.
flow_shift
*
sigmas
/
(
1
+
(
self
.
config
.
flow_shift
-
1
)
*
sigmas
))[:
-
1
]
.
copy
()
timesteps
=
(
sigmas
*
self
.
config
.
num_train_timesteps
).
copy
()
timesteps
=
(
sigmas
*
self
.
config
.
num_train_timesteps
).
copy
()
else
:
else
:
sigmas
=
np
.
interp
(
timesteps
,
np
.
arange
(
0
,
len
(
sigmas
)),
sigmas
)
sigmas
=
np
.
interp
(
timesteps
,
np
.
arange
(
0
,
len
(
sigmas
)),
sigmas
)
...
...
src/diffusers/schedulers/scheduling_dpmsolver_multistep_inverse.py
View file @
3f421fe0
...
@@ -297,7 +297,7 @@ class DPMSolverMultistepInverseScheduler(SchedulerMixin, ConfigMixin):
...
@@ -297,7 +297,7 @@ class DPMSolverMultistepInverseScheduler(SchedulerMixin, ConfigMixin):
elif
self
.
config
.
use_flow_sigmas
:
elif
self
.
config
.
use_flow_sigmas
:
alphas
=
np
.
linspace
(
1
,
1
/
self
.
config
.
num_train_timesteps
,
num_inference_steps
+
1
)
alphas
=
np
.
linspace
(
1
,
1
/
self
.
config
.
num_train_timesteps
,
num_inference_steps
+
1
)
sigmas
=
1.0
-
alphas
sigmas
=
1.0
-
alphas
sigmas
=
np
.
flip
(
self
.
config
.
flow_shift
*
sigmas
/
(
1
+
(
self
.
config
.
flow_shift
-
1
)
*
sigmas
))[:
-
1
]
sigmas
=
np
.
flip
(
self
.
config
.
flow_shift
*
sigmas
/
(
1
+
(
self
.
config
.
flow_shift
-
1
)
*
sigmas
))[:
-
1
]
.
copy
()
timesteps
=
(
sigmas
*
self
.
config
.
num_train_timesteps
).
copy
()
timesteps
=
(
sigmas
*
self
.
config
.
num_train_timesteps
).
copy
()
else
:
else
:
sigmas
=
np
.
interp
(
timesteps
,
np
.
arange
(
0
,
len
(
sigmas
)),
sigmas
)
sigmas
=
np
.
interp
(
timesteps
,
np
.
arange
(
0
,
len
(
sigmas
)),
sigmas
)
...
...
src/diffusers/schedulers/scheduling_dpmsolver_singlestep.py
View file @
3f421fe0
...
@@ -361,7 +361,7 @@ class DPMSolverSinglestepScheduler(SchedulerMixin, ConfigMixin):
...
@@ -361,7 +361,7 @@ class DPMSolverSinglestepScheduler(SchedulerMixin, ConfigMixin):
elif
self
.
config
.
use_flow_sigmas
:
elif
self
.
config
.
use_flow_sigmas
:
alphas
=
np
.
linspace
(
1
,
1
/
self
.
config
.
num_train_timesteps
,
num_inference_steps
+
1
)
alphas
=
np
.
linspace
(
1
,
1
/
self
.
config
.
num_train_timesteps
,
num_inference_steps
+
1
)
sigmas
=
1.0
-
alphas
sigmas
=
1.0
-
alphas
sigmas
=
np
.
flip
(
self
.
config
.
flow_shift
*
sigmas
/
(
1
+
(
self
.
config
.
flow_shift
-
1
)
*
sigmas
))[:
-
1
]
sigmas
=
np
.
flip
(
self
.
config
.
flow_shift
*
sigmas
/
(
1
+
(
self
.
config
.
flow_shift
-
1
)
*
sigmas
))[:
-
1
]
.
copy
()
timesteps
=
(
sigmas
*
self
.
config
.
num_train_timesteps
).
copy
()
timesteps
=
(
sigmas
*
self
.
config
.
num_train_timesteps
).
copy
()
else
:
else
:
sigmas
=
np
.
interp
(
timesteps
,
np
.
arange
(
0
,
len
(
sigmas
)),
sigmas
)
sigmas
=
np
.
interp
(
timesteps
,
np
.
arange
(
0
,
len
(
sigmas
)),
sigmas
)
...
...
src/diffusers/schedulers/scheduling_sasolver.py
View file @
3f421fe0
...
@@ -316,7 +316,7 @@ class SASolverScheduler(SchedulerMixin, ConfigMixin):
...
@@ -316,7 +316,7 @@ class SASolverScheduler(SchedulerMixin, ConfigMixin):
elif
self
.
config
.
use_flow_sigmas
:
elif
self
.
config
.
use_flow_sigmas
:
alphas
=
np
.
linspace
(
1
,
1
/
self
.
config
.
num_train_timesteps
,
num_inference_steps
+
1
)
alphas
=
np
.
linspace
(
1
,
1
/
self
.
config
.
num_train_timesteps
,
num_inference_steps
+
1
)
sigmas
=
1.0
-
alphas
sigmas
=
1.0
-
alphas
sigmas
=
np
.
flip
(
self
.
config
.
flow_shift
*
sigmas
/
(
1
+
(
self
.
config
.
flow_shift
-
1
)
*
sigmas
))[:
-
1
]
sigmas
=
np
.
flip
(
self
.
config
.
flow_shift
*
sigmas
/
(
1
+
(
self
.
config
.
flow_shift
-
1
)
*
sigmas
))[:
-
1
]
.
copy
()
timesteps
=
(
sigmas
*
self
.
config
.
num_train_timesteps
).
copy
()
timesteps
=
(
sigmas
*
self
.
config
.
num_train_timesteps
).
copy
()
else
:
else
:
sigmas
=
np
.
interp
(
timesteps
,
np
.
arange
(
0
,
len
(
sigmas
)),
sigmas
)
sigmas
=
np
.
interp
(
timesteps
,
np
.
arange
(
0
,
len
(
sigmas
)),
sigmas
)
...
...
src/diffusers/schedulers/scheduling_unipc_multistep.py
View file @
3f421fe0
...
@@ -379,7 +379,7 @@ class UniPCMultistepScheduler(SchedulerMixin, ConfigMixin):
...
@@ -379,7 +379,7 @@ class UniPCMultistepScheduler(SchedulerMixin, ConfigMixin):
elif
self
.
config
.
use_flow_sigmas
:
elif
self
.
config
.
use_flow_sigmas
:
alphas
=
np
.
linspace
(
1
,
1
/
self
.
config
.
num_train_timesteps
,
num_inference_steps
+
1
)
alphas
=
np
.
linspace
(
1
,
1
/
self
.
config
.
num_train_timesteps
,
num_inference_steps
+
1
)
sigmas
=
1.0
-
alphas
sigmas
=
1.0
-
alphas
sigmas
=
np
.
flip
(
self
.
config
.
flow_shift
*
sigmas
/
(
1
+
(
self
.
config
.
flow_shift
-
1
)
*
sigmas
))[:
-
1
]
sigmas
=
np
.
flip
(
self
.
config
.
flow_shift
*
sigmas
/
(
1
+
(
self
.
config
.
flow_shift
-
1
)
*
sigmas
))[:
-
1
]
.
copy
()
timesteps
=
(
sigmas
*
self
.
config
.
num_train_timesteps
).
copy
()
timesteps
=
(
sigmas
*
self
.
config
.
num_train_timesteps
).
copy
()
else
:
else
:
sigmas
=
np
.
interp
(
timesteps
,
np
.
arange
(
0
,
len
(
sigmas
)),
sigmas
)
sigmas
=
np
.
interp
(
timesteps
,
np
.
arange
(
0
,
len
(
sigmas
)),
sigmas
)
...
...
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