Skip to content

Conversation

bman654
Copy link
Contributor

@bman654 bman654 commented Jul 15, 2025

Fix code that is using the original destination input instead of the reshaped value.

If destination has 2 dimensions, then MaskComposite will throw

22:43:41.657 [Warning] [ComfyUI-0/STDERR]   File "G:\Apps\SwarmUI\dlbackend\comfy\ComfyUI\comfy_extras\nodes_mask.py", line 250, in combine
22:43:41.657 [Warning] [ComfyUI-0/STDERR]     destination_portion = destination[:, top:bottom, left:right]
22:43:41.658 [Warning] [ComfyUI-0/STDERR]                           ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
22:43:41.659 [Warning] [ComfyUI-0/STDERR] IndexError: too many indices for tensor of dimension 2
22:43:41.660 [Warning] [ComfyUI-0/STDERR]

because, even though it reshapes the input, it accidentally uses the original input when computing the destination_portion to be affected by the operation.

Fix code that is using the original `destination` input instead of the reshaped value.
@comfyanonymous comfyanonymous merged commit 6b8062f into comfyanonymous:master Jul 16, 2025
5 checks passed
@bman654 bman654 deleted the composite-mask-fix branch July 16, 2025 13:10
@bigcat88 bigcat88 mentioned this pull request Jul 16, 2025
rakki194 pushed a commit to rakki194/ComfyUI that referenced this pull request Jul 21, 2025
…mous#8915)

Fix code that is using the original `destination` input instead of the reshaped value.
Vander-Bilt pushed a commit to Vander-Bilt/ComfyUI that referenced this pull request Aug 26, 2025
…mous#8915)

Fix code that is using the original `destination` input instead of the reshaped value.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants