Skip to content

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.

Fix MaskComposite error when destination has 2 dimensions (#8915)

Brandon Wallace6b8062f4141f
diff --git a/comfy_extras/nodes_mask.py b/comfy_extras/nodes_mask.py
index ab387a2fc..2b0f8dd5d 100644
--- a/comfy_extras/nodes_mask.py
+++ b/comfy_extras/nodes_mask.py
@@ -247,7 +247,7 @@ class MaskComposite:
visible_width, visible_height = (right - left, bottom - top,)
source_portion = source[:, :visible_height, :visible_width]
- destination_portion = destination[:, top:bottom, left:right]
+ destination_portion = output[:, top:bottom, left:right]
if operation == "multiply":
output[:, top:bottom, left:right] = destination_portion * source_portion