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
61112c81
Commit
61112c81
authored
Nov 13, 2023
by
comfyanonymous
Browse files
Add a node to flip the sigmas for unsampling.
parent
eb0407e8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
comfy_extras/nodes_custom_sampler.py
comfy_extras/nodes_custom_sampler.py
+19
-0
No files found.
comfy_extras/nodes_custom_sampler.py
View file @
61112c81
...
...
@@ -118,6 +118,24 @@ class SplitSigmas:
sigmas2
=
sigmas
[
step
:]
return
(
sigmas1
,
sigmas2
)
class
FlipSigmas
:
@
classmethod
def
INPUT_TYPES
(
s
):
return
{
"required"
:
{
"sigmas"
:
(
"SIGMAS"
,
),
}
}
RETURN_TYPES
=
(
"SIGMAS"
,)
CATEGORY
=
"sampling/custom_sampling/sigmas"
FUNCTION
=
"get_sigmas"
def
get_sigmas
(
self
,
sigmas
):
sigmas
=
sigmas
.
flip
(
0
)
if
sigmas
[
0
]
==
0
:
sigmas
[
0
]
=
0.0001
return
(
sigmas
,)
class
KSamplerSelect
:
@
classmethod
def
INPUT_TYPES
(
s
):
...
...
@@ -243,4 +261,5 @@ NODE_CLASS_MAPPINGS = {
"SamplerDPMPP_SDE"
:
SamplerDPMPP_SDE
,
"BasicScheduler"
:
BasicScheduler
,
"SplitSigmas"
:
SplitSigmas
,
"FlipSigmas"
:
FlipSigmas
,
}
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