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
9321198d
Commit
9321198d
authored
Jan 29, 2024
by
comfyanonymous
Browse files
Add node to set only the conditioning area strength.
parent
079dbf91
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
nodes.py
nodes.py
+21
-0
No files found.
nodes.py
View file @
9321198d
...
...
@@ -184,6 +184,26 @@ class ConditioningSetAreaPercentage:
c
.
append
(
n
)
return
(
c
,
)
class
ConditioningSetAreaStrength
:
@
classmethod
def
INPUT_TYPES
(
s
):
return
{
"required"
:
{
"conditioning"
:
(
"CONDITIONING"
,
),
"strength"
:
(
"FLOAT"
,
{
"default"
:
1.0
,
"min"
:
0.0
,
"max"
:
10.0
,
"step"
:
0.01
}),
}}
RETURN_TYPES
=
(
"CONDITIONING"
,)
FUNCTION
=
"append"
CATEGORY
=
"conditioning"
def
append
(
self
,
conditioning
,
strength
):
c
=
[]
for
t
in
conditioning
:
n
=
[
t
[
0
],
t
[
1
].
copy
()]
n
[
1
][
'strength'
]
=
strength
c
.
append
(
n
)
return
(
c
,
)
class
ConditioningSetMask
:
@
classmethod
def
INPUT_TYPES
(
s
):
...
...
@@ -1754,6 +1774,7 @@ NODE_CLASS_MAPPINGS = {
"ConditioningConcat"
:
ConditioningConcat
,
"ConditioningSetArea"
:
ConditioningSetArea
,
"ConditioningSetAreaPercentage"
:
ConditioningSetAreaPercentage
,
"ConditioningSetAreaStrength"
:
ConditioningSetAreaStrength
,
"ConditioningSetMask"
:
ConditioningSetMask
,
"KSamplerAdvanced"
:
KSamplerAdvanced
,
"SetLatentNoiseMask"
:
SetLatentNoiseMask
,
...
...
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