mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-03-15 14:09:36 +00:00
Fix MaskComposite
This commit is contained in:
parent
87097a11c3
commit
b5fa3d28d7
@ -240,8 +240,8 @@ class MaskComposite:
|
|||||||
right, bottom = (min(left + source.shape[-1], destination.shape[-1]), min(top + source.shape[-2], destination.shape[-2]))
|
right, bottom = (min(left + source.shape[-1], destination.shape[-1]), min(top + source.shape[-2], destination.shape[-2]))
|
||||||
visible_width, visible_height = (right - left, bottom - top,)
|
visible_width, visible_height = (right - left, bottom - top,)
|
||||||
|
|
||||||
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]
|
||||||
|
|
||||||
if operation == "multiply":
|
if operation == "multiply":
|
||||||
output[:, top:bottom, left:right] = destination_portion * source_portion
|
output[:, top:bottom, left:right] = destination_portion * source_portion
|
||||||
|
Loading…
Reference in New Issue
Block a user