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
3fcab0c6
"include/vscode:/vscode.git/clone" did not exist on "b3a96764980c36392897c267ad0162d98d004f0e"
Commit
3fcab0c6
authored
Oct 14, 2023
by
comfyanonymous
Browse files
Merge branch 'fix-mask-nodes' of
https://github.com/jn-jairo/ComfyUI
parents
fd4c5f07
b5fa3d28
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
comfy_extras/nodes_mask.py
comfy_extras/nodes_mask.py
+6
-6
No files found.
comfy_extras/nodes_mask.py
View file @
3fcab0c6
...
...
@@ -240,8 +240,8 @@ class MaskComposite:
right
,
bottom
=
(
min
(
left
+
source
.
shape
[
-
1
],
destination
.
shape
[
-
1
]),
min
(
top
+
source
.
shape
[
-
2
],
destination
.
shape
[
-
2
]))
visible_width
,
visible_height
=
(
right
-
left
,
bottom
-
top
,)
source_portion
=
source
[:
visible_height
,
:
visible_width
]
destination_portion
=
destination
[
top
:
bottom
,
left
:
right
]
source_portion
=
source
[
:,
:
visible_height
,
:
visible_width
]
destination_portion
=
destination
[
:,
top
:
bottom
,
left
:
right
]
if
operation
==
"multiply"
:
output
[:,
top
:
bottom
,
left
:
right
]
=
destination_portion
*
source_portion
...
...
@@ -282,10 +282,10 @@ class FeatherMask:
def
feather
(
self
,
mask
,
left
,
top
,
right
,
bottom
):
output
=
mask
.
reshape
((
-
1
,
mask
.
shape
[
-
2
],
mask
.
shape
[
-
1
])).
clone
()
left
=
min
(
left
,
output
.
shape
[
1
])
right
=
min
(
right
,
output
.
shape
[
1
])
top
=
min
(
top
,
output
.
shape
[
0
])
bottom
=
min
(
bottom
,
output
.
shape
[
0
])
left
=
min
(
left
,
output
.
shape
[
-
1
])
right
=
min
(
right
,
output
.
shape
[
-
1
])
top
=
min
(
top
,
output
.
shape
[
-
2
])
bottom
=
min
(
bottom
,
output
.
shape
[
-
2
])
for
x
in
range
(
left
):
feather_rate
=
(
x
+
1.0
)
/
left
...
...
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