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
ccb1b259
Commit
ccb1b259
authored
Jul 05, 2023
by
comfyanonymous
Browse files
Add a conditioning concat node.
parent
af7a4991
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
nodes.py
nodes.py
+29
-0
No files found.
nodes.py
View file @
ccb1b259
...
@@ -102,6 +102,34 @@ class ConditioningAverage :
...
@@ -102,6 +102,34 @@ class ConditioningAverage :
out
.
append
(
n
)
out
.
append
(
n
)
return
(
out
,
)
return
(
out
,
)
class
ConditioningConcat
:
@
classmethod
def
INPUT_TYPES
(
s
):
return
{
"required"
:
{
"conditioning_to"
:
(
"CONDITIONING"
,),
"conditioning_from"
:
(
"CONDITIONING"
,),
}}
RETURN_TYPES
=
(
"CONDITIONING"
,)
FUNCTION
=
"concat"
CATEGORY
=
"advanced/conditioning"
def
concat
(
self
,
conditioning_to
,
conditioning_from
):
out
=
[]
if
len
(
conditioning_from
)
>
1
:
print
(
"Warning: ConditioningConcat conditioning_from contains more than 1 cond, only the first one will actually be applied to conditioning_to."
)
cond_from
=
conditioning_from
[
0
][
0
]
for
i
in
range
(
len
(
conditioning_to
)):
t1
=
conditioning_to
[
i
][
0
]
tw
=
torch
.
cat
((
t1
,
cond_from
),
1
)
n
=
[
tw
,
conditioning_to
[
i
][
1
].
copy
()]
out
.
append
(
n
)
return
(
out
,
)
class
ConditioningSetArea
:
class
ConditioningSetArea
:
@
classmethod
@
classmethod
def
INPUT_TYPES
(
s
):
def
INPUT_TYPES
(
s
):
...
@@ -1409,6 +1437,7 @@ NODE_CLASS_MAPPINGS = {
...
@@ -1409,6 +1437,7 @@ NODE_CLASS_MAPPINGS = {
"SaveLatent"
:
SaveLatent
,
"SaveLatent"
:
SaveLatent
,
"ConditioningZeroOut"
:
ConditioningZeroOut
,
"ConditioningZeroOut"
:
ConditioningZeroOut
,
"ConditioningConcat"
:
ConditioningConcat
,
}
}
NODE_DISPLAY_NAME_MAPPINGS
=
{
NODE_DISPLAY_NAME_MAPPINGS
=
{
...
...
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