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
chenpangpang
ComfyUI
Commits
57d7f446
Commit
57d7f446
authored
Nov 28, 2023
by
comfyanonymous
Browse files
Add SDTurboScheduler node.
parent
21063fa3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
comfy_extras/nodes_custom_sampler.py
comfy_extras/nodes_custom_sampler.py
+20
-0
No files found.
comfy_extras/nodes_custom_sampler.py
View file @
57d7f446
...
@@ -81,6 +81,25 @@ class PolyexponentialScheduler:
...
@@ -81,6 +81,25 @@ class PolyexponentialScheduler:
sigmas
=
k_diffusion_sampling
.
get_sigmas_polyexponential
(
n
=
steps
,
sigma_min
=
sigma_min
,
sigma_max
=
sigma_max
,
rho
=
rho
)
sigmas
=
k_diffusion_sampling
.
get_sigmas_polyexponential
(
n
=
steps
,
sigma_min
=
sigma_min
,
sigma_max
=
sigma_max
,
rho
=
rho
)
return
(
sigmas
,
)
return
(
sigmas
,
)
class
SDTurboScheduler
:
@
classmethod
def
INPUT_TYPES
(
s
):
return
{
"required"
:
{
"model"
:
(
"MODEL"
,),
"steps"
:
(
"INT"
,
{
"default"
:
1
,
"min"
:
1
,
"max"
:
10
}),
}
}
RETURN_TYPES
=
(
"SIGMAS"
,)
CATEGORY
=
"sampling/custom_sampling/schedulers"
FUNCTION
=
"get_sigmas"
def
get_sigmas
(
self
,
model
,
steps
):
timesteps
=
torch
.
flip
(
torch
.
arange
(
1
,
11
)
*
100
-
1
,
(
0
,))[:
steps
]
sigmas
=
model
.
model
.
model_sampling
.
sigma
(
timesteps
)
sigmas
=
torch
.
cat
([
sigmas
,
sigmas
.
new_zeros
([
1
])])
return
(
sigmas
,
)
class
VPScheduler
:
class
VPScheduler
:
@
classmethod
@
classmethod
def
INPUT_TYPES
(
s
):
def
INPUT_TYPES
(
s
):
...
@@ -257,6 +276,7 @@ NODE_CLASS_MAPPINGS = {
...
@@ -257,6 +276,7 @@ NODE_CLASS_MAPPINGS = {
"ExponentialScheduler"
:
ExponentialScheduler
,
"ExponentialScheduler"
:
ExponentialScheduler
,
"PolyexponentialScheduler"
:
PolyexponentialScheduler
,
"PolyexponentialScheduler"
:
PolyexponentialScheduler
,
"VPScheduler"
:
VPScheduler
,
"VPScheduler"
:
VPScheduler
,
"SDTurboScheduler"
:
SDTurboScheduler
,
"KSamplerSelect"
:
KSamplerSelect
,
"KSamplerSelect"
:
KSamplerSelect
,
"SamplerDPMPP_2M_SDE"
:
SamplerDPMPP_2M_SDE
,
"SamplerDPMPP_2M_SDE"
:
SamplerDPMPP_2M_SDE
,
"SamplerDPMPP_SDE"
:
SamplerDPMPP_SDE
,
"SamplerDPMPP_SDE"
:
SamplerDPMPP_SDE
,
...
...
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