Shape Mask(ShapeMaskStage)
Shape Mask (ShapeMaskStage) is a video effects node from the ComfyTV package, grouped under ComfyTV/VideoFX.
Shape Mask Stage
Description
Shape Mask (ShapeMaskStage) is a video effects node from the ComfyTV package, grouped under ComfyTV/VideoFX. It applies a shape-driven mask to a video: a shape image supplies the mask region, and the node outputs the source video with that mask applied. An invert toggle lets you flip the mask so the shape defines the excluded area instead of the kept area.
Use this node when you want to confine a video to an arbitrary shape, create cutouts, or punch a shaped hole through footage, without leaving the ComfyTV video pipeline. Both media inputs are optional, so the node can be wired with only the inputs your particular setup needs.
Inputs
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
invert | BOOLEAN | Yes | false | Controls mask polarity. When false, the shape identifies the region that is kept visible. When true, the mask is flipped so the shape identifies the region that is removed or masked out. |
video | COMFYTV_VIDEO | No | - | The source video to be masked. This is the footage the shape is applied to. |
shape_image | COMFYTV_IMAGE | No | - | The image that defines the shape used as the mask. Bright and dark areas of this image determine which parts of the video are kept. |
Because video and shape_image are optional sockets, you can leave either one unconnected. In normal use you connect both: the video provides the content, and the shape image provides the mask geometry. Connecting only one is useful when you are building or testing a graph incrementally.
Outputs
| Name | Type | Description |
|---|---|---|
COMFYTV_VIDEO | COMFYTV_VIDEO | The masked result. The output keeps the ComfyTV video type so it can be passed directly into downstream ComfyTV video nodes. |
Usage Notes
- Start with
invertset tofalseto see which region the shape image selects. If the result is the opposite of what you want, enableinvertrather than rebuilding the shape image. - The mask is driven by an image rather than a hard-coded primitive, so any image that reads clearly as a shape (a silhouette, a matte, a simple black-and-white graphic) can serve as
shape_image. - Both inputs use ComfyTV custom types. If your source material is a standard ComfyUI image or video, convert it with the appropriate ComfyTV loader or conversion nodes before connecting it here.
- The node lives under
ComfyTV/VideoFX; look there when adding it from the node search menu. - Since the output is a
COMFYTV_VIDEO, this stage can be chained with other ComfyTV video effects and saved through the package's video output nodes.
Comments
Sign in with GitHub to join the discussion.