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
565eb6d1
"host/online_compilation/kernel_includes.cpp.in" did not exist on "1685048a6725e531b577510295d2d62664c15962"
Commit
565eb6d1
authored
May 05, 2024
by
comfyanonymous
Browse files
Add a SplitSigmasDenoise node as an alternative to SplitSigmas.
parent
9a70b70d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
comfy_extras/nodes_custom_sampler.py
comfy_extras/nodes_custom_sampler.py
+23
-0
No files found.
comfy_extras/nodes_custom_sampler.py
View file @
565eb6d1
...
@@ -139,6 +139,7 @@ class SplitSigmas:
...
@@ -139,6 +139,7 @@ class SplitSigmas:
}
}
}
}
RETURN_TYPES
=
(
"SIGMAS"
,
"SIGMAS"
)
RETURN_TYPES
=
(
"SIGMAS"
,
"SIGMAS"
)
RETURN_NAMES
=
(
"high_sigmas"
,
"low_sigmas"
)
CATEGORY
=
"sampling/custom_sampling/sigmas"
CATEGORY
=
"sampling/custom_sampling/sigmas"
FUNCTION
=
"get_sigmas"
FUNCTION
=
"get_sigmas"
...
@@ -148,6 +149,27 @@ class SplitSigmas:
...
@@ -148,6 +149,27 @@ class SplitSigmas:
sigmas2
=
sigmas
[
step
:]
sigmas2
=
sigmas
[
step
:]
return
(
sigmas1
,
sigmas2
)
return
(
sigmas1
,
sigmas2
)
class
SplitSigmasDenoise
:
@
classmethod
def
INPUT_TYPES
(
s
):
return
{
"required"
:
{
"sigmas"
:
(
"SIGMAS"
,
),
"denoise"
:
(
"FLOAT"
,
{
"default"
:
1.0
,
"min"
:
0.0
,
"max"
:
1.0
,
"step"
:
0.01
}),
}
}
RETURN_TYPES
=
(
"SIGMAS"
,
"SIGMAS"
)
RETURN_NAMES
=
(
"high_sigmas"
,
"low_sigmas"
)
CATEGORY
=
"sampling/custom_sampling/sigmas"
FUNCTION
=
"get_sigmas"
def
get_sigmas
(
self
,
sigmas
,
denoise
):
steps
=
max
(
sigmas
.
shape
[
-
1
]
-
1
,
0
)
total_steps
=
round
(
steps
*
denoise
)
sigmas1
=
sigmas
[:
-
(
total_steps
)]
sigmas2
=
sigmas
[
-
(
total_steps
+
1
):]
return
(
sigmas1
,
sigmas2
)
class
FlipSigmas
:
class
FlipSigmas
:
@
classmethod
@
classmethod
def
INPUT_TYPES
(
s
):
def
INPUT_TYPES
(
s
):
...
@@ -599,6 +621,7 @@ NODE_CLASS_MAPPINGS = {
...
@@ -599,6 +621,7 @@ NODE_CLASS_MAPPINGS = {
"SamplerDPMPP_SDE"
:
SamplerDPMPP_SDE
,
"SamplerDPMPP_SDE"
:
SamplerDPMPP_SDE
,
"SamplerDPMAdaptative"
:
SamplerDPMAdaptative
,
"SamplerDPMAdaptative"
:
SamplerDPMAdaptative
,
"SplitSigmas"
:
SplitSigmas
,
"SplitSigmas"
:
SplitSigmas
,
"SplitSigmasDenoise"
:
SplitSigmasDenoise
,
"FlipSigmas"
:
FlipSigmas
,
"FlipSigmas"
:
FlipSigmas
,
"CFGGuider"
:
CFGGuider
,
"CFGGuider"
:
CFGGuider
,
...
...
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