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
2ef459b1
Commit
2ef459b1
authored
Oct 01, 2023
by
comfyanonymous
Browse files
Add VPScheduler node
parent
8ab49dc0
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 @
2ef459b1
...
...
@@ -80,6 +80,25 @@ class PolyexponentialScheduler:
sigmas
=
k_diffusion_sampling
.
get_sigmas_polyexponential
(
n
=
steps
,
sigma_min
=
sigma_min
,
sigma_max
=
sigma_max
,
rho
=
rho
)
return
(
sigmas
,
)
class
VPScheduler
:
@
classmethod
def
INPUT_TYPES
(
s
):
return
{
"required"
:
{
"steps"
:
(
"INT"
,
{
"default"
:
20
,
"min"
:
1
,
"max"
:
10000
}),
"beta_d"
:
(
"FLOAT"
,
{
"default"
:
19.9
,
"min"
:
0.0
,
"max"
:
1000.0
,
"step"
:
0.01
,
"round"
:
False
}),
#TODO: fix default values
"beta_min"
:
(
"FLOAT"
,
{
"default"
:
0.1
,
"min"
:
0.0
,
"max"
:
1000.0
,
"step"
:
0.01
,
"round"
:
False
}),
"eps_s"
:
(
"FLOAT"
,
{
"default"
:
0.001
,
"min"
:
0.0
,
"max"
:
1.0
,
"step"
:
0.0001
,
"round"
:
False
}),
}
}
RETURN_TYPES
=
(
"SIGMAS"
,)
CATEGORY
=
"_for_testing/custom_sampling"
FUNCTION
=
"get_sigmas"
def
get_sigmas
(
self
,
steps
,
beta_d
,
beta_min
,
eps_s
):
sigmas
=
k_diffusion_sampling
.
get_sigmas_vp
(
n
=
steps
,
beta_d
=
beta_d
,
beta_min
=
beta_min
,
eps_s
=
eps_s
)
return
(
sigmas
,
)
class
SplitSigmas
:
@
classmethod
def
INPUT_TYPES
(
s
):
...
...
@@ -217,6 +236,7 @@ NODE_CLASS_MAPPINGS = {
"KarrasScheduler"
:
KarrasScheduler
,
"ExponentialScheduler"
:
ExponentialScheduler
,
"PolyexponentialScheduler"
:
PolyexponentialScheduler
,
"VPScheduler"
:
VPScheduler
,
"KSamplerSelect"
:
KSamplerSelect
,
"SamplerDPMPP_2M_SDE"
:
SamplerDPMPP_2M_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