The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.
Round the mask values for bitwise operations.
comfyanonymousf3ac938b4a5c
diff --git a/comfy_extras/nodes_mask.py b/comfy_extras/nodes_mask.pyindex 9134c24da..15377af14 100644--- a/comfy_extras/nodes_mask.py+++ b/comfy_extras/nodes_mask.py@@ -194,11 +194,11 @@ class MaskComposite:elif operation == "subtract":output[top:bottom, left:right] = destination_portion - source_portionelif operation == "and":- output[top:bottom, left:right] = torch.bitwise_and(destination_portion.bool(), source_portion.bool()).float()+ output[top:bottom, left:right] = torch.bitwise_and(destination_portion.round().bool(), source_portion.round().bool()).float()elif operation == "or":- output[top:bottom, left:right] = torch.bitwise_or(destination_portion.bool(), source_portion.bool()).float()+ output[top:bottom, left:right] = torch.bitwise_or(destination_portion.round().bool(), source_portion.round().bool()).float()elif operation == "xor":- output[top:bottom, left:right] = torch.bitwise_xor(destination_portion.bool(), source_portion.bool()).float()+ output[top:bottom, left:right] = torch.bitwise_xor(destination_portion.round().bool(), source_portion.round().bool()).float()output = torch.clamp(output, 0.0, 1.0)