Wireflow is now a Claude connector.

Set it up→

Masked Composite

Copy agent promptDownload schemaOpen in a workflowCopy link

Hide a region of a video behind a mask, EXACTLY. Wire the clip into `video` and a black-and-white mask video into `mask` (white = the region, e.g.

UtilityFrom 0 creditsWireflow

Input

10 fields

Result Idle

Your result will appear here.

Set your inputs, then open a workflow to create it.

Credit estimate uses the model defaults. Your workflow shows the final estimate for your inputs before you run.

Model guide

Build with Masked Composite.

Hide a region of a video behind a mask, EXACTLY. Wire the clip into `video` and a black-and-white mask video into `mask` (white = the region, e.g.

Read the Masked Composite docs

Best for

Hide a region of a video behind a mask, EXACTLY. Wire the clip into `video` and a black-and-white mask video into `mask` (white = the region, e.g. Use the playground to set up a single step, then open a workflow when you want to connect more tools.

Inputs explained

Video (required)
Set the video used by this model. Type: video.
Mask (white = region) (required)
Set the mask (white = region) used by this model. Type: video.
Fill Video (mode: video) (optional)
Set the fill video (mode: video) used by this model. Type: video.
Fill (optional)
Set the fill used by this model. Type: text. Options: blur, solid, video. Default: "blur".
Blur strength (sigma px, 1-200; blank = 24) (optional)
Set the blur strength (sigma px, 1-200; blank = 24) used by this model. Type: number.
Solid colour (hex; blank = #808080) (optional)
Set the solid colour (hex; blank = #808080) used by this model. Type: text.
Grow mask (px, -40 to 40, negative shrinks; blank = 0) (optional)
Set the grow mask (px, -40 to 40, negative shrinks; blank = 0) used by this model. Type: number.
Feather (px, 0-50; blank = 0) (optional)
Set the feather (px, 0-50; blank = 0) used by this model. Type: number.
Invert (hide everything except the region) (optional)
Set the invert (hide everything except the region) used by this model. Type: boolean. Default: false.
Quality (CRF, 12 best … 30 smallest; blank = 18) (optional)
Set the quality (crf, 12 best … 30 smallest; blank = 18) used by this model. Type: number.

Tips before you run

Start with the default settings and change one input at a time. Keep the result you like on your board so the next step can use it.

If you add a reference file, use a link the workflow can read. Check the inputs and credit estimate on the board before starting a run.

Working with this model

What it is for

Hide one region of a clip and leave the rest of the frame exactly as it was. Wire the clip into Video and a black-and-white mask video into Mask. White is the region. Then pick what goes there:

  • blur: a Gaussian blur of the clip itself. Blur strength is the sigma in pixels (default 24); raise it on 4K footage.
  • solid: one flat Solid colour (default #808080).
  • video: a second clip wired into Fill Video shows through the mask.

Recipe: hide the source face before a Seedance swap

Seedance 2.5 in reference mode copies whatever face it can see in the reference video, even when your stills show someone else. Take the face away and identity can only come from the stills:

  1. Import (your reference clip) into Segment Mask with the prompt face.
  2. Wire the same Import into Masked Composite's Video, and Segment Mask's output into Mask. Fill: blur (the shot still reads as a person) or solid (nothing left to copy at all).
  3. Wire Masked Composite's output into Seedance's reference video port, next to your character stills.

No Segment Mask on your canvas yet? Any black-and-white mask video made from the same clip works in its place.

A few pixels of Feather hide the edge if the result is also something people watch. For a model input it does not matter.

Recipe: character-isolated depth

Depth inside the person, real footage everywhere else: Segment Mask (prompt person) into Mask, Depth Map (Video) of the same clip into Fill Video, Fill: video. Seedance then gets the real room and camera but only a depth silhouette of the performer.

Grow: the dark outline on a person swap

A segmentation mask hugs its subject's edge, and Feather softens that edge both ways. So on a person swap the original subject's outermost pixels end up half inside the blend and show as a thin dark outline around the new performer, and anything the mask missed (a dangling strap) stays in the shot.

Grow mask moves the mask's edge before the feather, in pixels of the output:

  • positive grows the white region. Set it a few pixels past the feather (feather 8, grow 12) and the old outline is covered, not blended;
  • negative shrinks it, for a mask that spills past its subject;
  • blank or 0 uses the mask as wired.

It is measured as a square, so a diagonal edge moves up to 1.4 times as far as a straight one. Thin parts grow like the rest, and a shape touching the frame edge still touches it after a shrink. The mask is cut at 50% grey first, so a grown mask has a hard edge until Feather softens it. With Invert on, grow still acts on the white region, so a positive grow hides less.

A shrink wider than the mask would erase it and hide nothing (on a face-hide, the face goes straight to the next model). The run checks for that and fails with "grow -N erases the mask" when a shrink leaves none, or under 5%, of the mask; use a smaller shrink. With Invert on, a grow that covers the whole frame fails the same way.

That check looks at only three frames (a quarter, half and three quarters into the clip) and counts the whole mask, not each subject. So a shrink can still uncover a subject that is small only between those frames (after a cut to a wide shot), or a small subject next to a big one (a strap beside a body), and the run passes. On a face-hide, keep the shrink well under the face's width and look at the result.

Why the rest of the frame does not change

Video Blend works on the YUV planes, so a mask blended with lighten also shifts every pixel's colour toward grey (measured: about a 24% saturation drop over the whole frame). This node never converts the clip. It lays the fill over the clip in the clip's own 4:2:0 planes, with the mask as the fill's alpha, so a pixel outside the mask comes out of the composite with the same value it went in with. The one thing that touches it is the final x264 encode (CRF 18, the same generation every encode node here costs). Measured on a test clip: mean difference 0.40 code values outside the mask, against 0.31 for re-encoding the clip with no composite at all, and no colour shift (saturation ratio 1.000).

Before calling a run done, the node checks its own output: the length must match the clip's within a frame, and three sampled frames must show the fill wherever the region had to change. Pixels where the clip already showed the fill (a second composite with the same take, say) are not counted either way. A run that fails either check is an error, never a clip passed on as masked.

The mask is cleaned up before it is used: anything at or below 12% grey counts as outside, anything at or above 88% as fully inside, so compression noise in a black mask never bleeds into the frame. Invert hides everything except the region.

Sizes, frame rates and lengths

The output always has the clip's size, frames and length, and its audio is copied untouched.

  • A phone clip recorded in portrait (stored sideways with a rotation flag) is used upright, and so is its mask; the output is upright with no rotation flag.
  • The mask is scaled to the clip. A mask with a different shape as displayed (more than 2% off) is refused, because it was made from a different video and would not line up.
  • A mask shorter than the clip is refused rather than holding its last frame, which would uncover the region for the rest of the clip. A longer one is cut.
  • The fill video is scaled to cover the clip and centre-cropped. A shorter fill holds its last frame; a longer one is cut.
  • Each frame of the clip uses the mask frame at the same moment, so a mask at a different frame rate still lines up, and so does a clip whose file does not start at zero (.ts recordings, trimmed exports).

Limits

Clips over 30 seconds are refused (cut first with Video Trim), as are HDR clips and inputs over 500 MB. Every adaptation the node made (scaling, a held frame) is listed on the card after the run.

This node is free: it quotes and charges 0 credits.

Common questions

How do I use Masked Composite on Wireflow?

Set the inputs above and choose Open in a workflow. Sign in to save your board, then check its credit estimate before you run.

Can I use Masked Composite through an API?

Yes. Save a workflow with this model, then call the Wireflow run API with its workflow ID. The API tab has examples you can copy.

What changes the credit price?

The price shown uses the model defaults. Your inputs and model settings can change the total. The workflow shows an estimate before you run.

Can I connect this to another model?

Yes. Open it in a workflow and connect its output to another node with a matching input type.