Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve MaskOutput dimension consistency (#7591)
## Summary This PR fixes an issue with mask dimension consistency. Prior to this change, the following workflow would fail with `tuple out of range` error: <img width="1072" alt="image" src="https://github.com/user-attachments/assets/d0a9e658-1d64-4db4-adee-973bbdaca745" /> ### Before this PR Dimension compatibility for invocations that take a mask input: - `ApplyMaskTensorToImageInvocation`: 2 or 3 - `MaskTensorToImageInvocation`: 2 or 3 - `InvertTensorMaskInvocation`: 3 Mask dimension for invocations that produce a MaskOutput: - `RectangleMaskInvocation`: 3 - `AlphaMaskToTensorInvocation`: 3 - `InvertTensorMaskInvocation`: 3 - `ImageMaskToTensorInvocation`: 3 - `SegmentAnythingInvocation`: 2 ### After this PR (changes in bold) Dimension compatibility for invocations that take a mask input: - `ApplyMaskTensorToImageInvocation`: 2 or 3 - `MaskTensorToImageInvocation`: 2 or 3 - `InvertTensorMaskInvocation`: **2 or 3** <---------------- Mask dimension for invocations that produce a MaskOutput: - `RectangleMaskInvocation`: 3 - `AlphaMaskToTensorInvocation`: 3 - `InvertTensorMaskInvocation`: 3 - `ImageMaskToTensorInvocation`: 3 - `SegmentAnythingInvocation`: **3** <------------------- ## QA Instructions I tested the workflow in the PR description and this workflow: <img width="872" alt="image" src="https://github.com/user-attachments/assets/20496860-ce81-47c0-a46a-a611b73faa22" /> ## Merge Plan No special instructions. ## Checklist - [x] _The PR has a short but descriptive title, suitable for a changelog_ - [x] _Tests added / updated (if applicable)_ - [x] _Documentation added / updated (if applicable)_ - [ ] _Updated `What's New` copy (if doing a release after this PR)_
- Loading branch information