Commit 476d543f authored by comfyanonymous's avatar comfyanonymous
Browse files
parent 2525fcd3
...@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment