Skip to content

Commit 476d543

Browse files
Fix for older python.
from: #476
1 parent 2525fcd commit 476d543

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

comfy_extras/nodes_mask.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -187,13 +187,12 @@ def combine(self, destination, source, x, y, operation):
187187
source_portion = source[:visible_height, :visible_width]
188188
destination_portion = destination[top:bottom, left:right]
189189

190-
match operation:
191-
case "multiply":
192-
output[top:bottom, left:right] = destination_portion * source_portion
193-
case "add":
194-
output[top:bottom, left:right] = destination_portion + source_portion
195-
case "subtract":
196-
output[top:bottom, left:right] = destination_portion - source_portion
190+
if operation == "multiply":
191+
output[top:bottom, left:right] = destination_portion * source_portion
192+
elif operation == "add":
193+
output[top:bottom, left:right] = destination_portion + source_portion
194+
elif operation == "subtract":
195+
output[top:bottom, left:right] = destination_portion - source_portion
197196

198197
output = torch.clamp(output, 0.0, 1.0)
199198

0 commit comments

Comments
 (0)