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
c66db067
Commit
c66db067
authored
Apr 29, 2023
by
comfyanonymous
Browse files
Make ConditioningSetMask area option a bit more clear.
Make ConditioningSetArea override the set_area_to_bounds.
parent
071011ae
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
nodes.py
nodes.py
+6
-2
No files found.
nodes.py
View file @
c66db067
...
...
@@ -80,6 +80,7 @@ class ConditioningSetArea:
n
=
[
t
[
0
],
t
[
1
].
copy
()]
n
[
1
][
'area'
]
=
(
height
//
8
,
width
//
8
,
y
//
8
,
x
//
8
)
n
[
1
][
'strength'
]
=
strength
n
[
1
][
'set_area_to_bounds'
]
=
False
n
[
1
][
'min_sigma'
]
=
min_sigma
n
[
1
][
'max_sigma'
]
=
max_sigma
c
.
append
(
n
)
...
...
@@ -90,16 +91,19 @@ class ConditioningSetMask:
def
INPUT_TYPES
(
s
):
return
{
"required"
:
{
"conditioning"
:
(
"CONDITIONING"
,
),
"mask"
:
(
"MASK"
,
),
"set_area_to_bounds"
:
([
False
,
True
],),
"strength"
:
(
"FLOAT"
,
{
"default"
:
1.0
,
"min"
:
0.0
,
"max"
:
10.0
,
"step"
:
0.01
}),
"set_cond_area"
:
([
"default"
,
"mask bounds"
],),
}}
RETURN_TYPES
=
(
"CONDITIONING"
,)
FUNCTION
=
"append"
CATEGORY
=
"conditioning"
def
append
(
self
,
conditioning
,
mask
,
set_
area_to_bounds
,
strength
):
def
append
(
self
,
conditioning
,
mask
,
set_
cond_area
,
strength
):
c
=
[]
set_area_to_bounds
=
False
if
set_cond_area
!=
"default"
:
set_area_to_bounds
=
True
if
len
(
mask
.
shape
)
<
3
:
mask
=
mask
.
unsqueeze
(
0
)
for
t
in
conditioning
:
...
...
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