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
76e0f8fc
Commit
76e0f8fc
authored
Sep 28, 2023
by
comfyanonymous
Browse files
Add function to split sigmas.
parent
2bf051fd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
comfy_extras/nodes_custom_sampler.py
comfy_extras/nodes_custom_sampler.py
+18
-0
No files found.
comfy_extras/nodes_custom_sampler.py
View file @
76e0f8fc
...
...
@@ -43,6 +43,23 @@ class KarrasScheduler:
sigmas
=
k_diffusion_sampling
.
get_sigmas_karras
(
n
=
steps
,
sigma_min
=
sigma_min
,
sigma_max
=
sigma_max
,
rho
=
rho
)
return
(
sigmas
,
)
class
SplitSigmas
:
@
classmethod
def
INPUT_TYPES
(
s
):
return
{
"required"
:
{
"sigmas"
:
(
"SIGMAS"
,
),
"step"
:
(
"INT"
,
{
"default"
:
0
,
"min"
:
0
,
"max"
:
10000
}),
}
}
RETURN_TYPES
=
(
"SIGMAS"
,
"SIGMAS"
)
CATEGORY
=
"_for_testing/custom_sampling"
FUNCTION
=
"get_sigmas"
def
get_sigmas
(
self
,
sigmas
,
step
):
sigmas1
=
sigmas
[:
step
+
1
]
sigmas2
=
sigmas
[
step
+
1
:]
return
(
sigmas1
,
sigmas2
)
class
KSamplerSelect
:
@
classmethod
...
...
@@ -116,4 +133,5 @@ NODE_CLASS_MAPPINGS = {
"KarrasScheduler"
:
KarrasScheduler
,
"KSamplerSelect"
:
KSamplerSelect
,
"BasicScheduler"
:
BasicScheduler
,
"SplitSigmas"
:
SplitSigmas
,
}
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