ComfyUI Node
Mask Align
Slides a painted area so it lines up with a reference mask, or with the frame when none is given. Each axis picks its own anchor: center centres the paint inside the reference, left/top glues the two near edges together, right/bottom lines the two far edges up, none leaves that axis alone. output aligned moves the paint itself, soft edges and all; output bbox draws the solid rectangle it occupies, and union_bbox extends that rectangle to cover the reference too. A whole batch moves by one shared offset so video frames stay registered.
Mask Align
- mask
- reference
- mask
◄align_xcenter►
◄align_ycenter►
◄outputaligned►
◄union_bboxfalse►
CategoryQG-tools/Mask
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| mask | MASK | The mask to move. Every frame moves by the same offset. | |
| align_x | COMBO | center | Horizontal anchor. none leaves x alone. |
| align_y | COMBO | center | Vertical anchor. none leaves y alone. |
| output | COMBO | aligned | aligned: the paint, moved. bbox: a solid rectangle covering where it landed. |
| union_bbox | BOOLEAN | false | bbox only: stretch the rectangle to cover the reference's too. No effect without a reference. |
| referenceopt | MASK | What to line up against. Anything not fully transparent counts, whatever its brightness. Empty means the frame itself. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| mask | MASK | The moved mask, same size as the one handed in. |