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
476d543f
Commit
476d543f
authored
Apr 15, 2023
by
comfyanonymous
Browse files
Fix for older python.
from:
https://github.com/comfyanonymous/ComfyUI/discussions/476
parent
2525fcd3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
comfy_extras/nodes_mask.py
comfy_extras/nodes_mask.py
+6
-7
No files found.
comfy_extras/nodes_mask.py
View file @
476d543f
...
@@ -187,13 +187,12 @@ class MaskComposite:
...
@@ -187,13 +187,12 @@ class MaskComposite:
source_portion
=
source
[:
visible_height
,
:
visible_width
]
source_portion
=
source
[:
visible_height
,
:
visible_width
]
destination_portion
=
destination
[
top
:
bottom
,
left
:
right
]
destination_portion
=
destination
[
top
:
bottom
,
left
:
right
]
match
operation
:
if
operation
==
"multiply"
:
case
"multiply"
:
output
[
top
:
bottom
,
left
:
right
]
=
destination_portion
*
source_portion
output
[
top
:
bottom
,
left
:
right
]
=
destination_portion
*
source_portion
elif
operation
==
"add"
:
case
"add"
:
output
[
top
:
bottom
,
left
:
right
]
=
destination_portion
+
source_portion
output
[
top
:
bottom
,
left
:
right
]
=
destination_portion
+
source_portion
elif
operation
==
"subtract"
:
case
"subtract"
:
output
[
top
:
bottom
,
left
:
right
]
=
destination_portion
-
source_portion
output
[
top
:
bottom
,
left
:
right
]
=
destination_portion
-
source_portion
output
=
torch
.
clamp
(
output
,
0.0
,
1.0
)
output
=
torch
.
clamp
(
output
,
0.0
,
1.0
)
...
...
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