floyo logo
Powered by
ThinkDiffusion
floyo logo
Powered by
ThinkDiffusion

MatAnyone2 V2V with Auto Segmentation

Remove any subject from video with MatAnyone2. Auto-detects by text, tracks frame by frame, and outputs a green screen, matte, and side-by-side comparison.

27

Generates in about -- secs

Nodes & Models

VHS_LoadVideo
VHS_VideoInfoLoaded
VHS_VideoCombine
VHS_LoadVideo
VHS_VideoInfoLoaded
VHS_VideoCombine
WorkflowGraphics
GetImageRangeFromBatch
GetImageSize
Reroute
PreviewImage
Segment
SolidColorBatched
AILab_MaskPreview
MaskToImage
MatAnyone2
ImageConcatMulti
JWImageResizeByLongerSide
easy cleanGpuUsed

Description:

Extract any subject from video with clean alpha mattes that keep hair, fabric edges, and motion blur intact.

Upload a video, type a text description of the subject you want to isolate (like "man" or "woman with red jacket"), and MatAnyone 2 generates two outputs: a green screen version and a raw alpha matte. The workflow handles segmentation automatically using GroundingDINO + SAM on the first frame, then MatAnyone 2 propagates that mask across every frame. Audio carries through to the final output.

No manual masking. No green screen on set. Describe the subject, hit run.

How do you use MatAnyone 2 for video background removal?

Upload your video, type a short description of the subject you want to extract, and run the workflow. MatAnyone 2 auto-segments the first frame using your text prompt, then propagates that matte across the full video. You get a green screen output and a separate alpha matte, both with audio intact.

Subject Description This is the text prompt that tells the segmenter what to isolate. Keep it short and specific. "man" works. "person in blue shirt" works. "cat on the left" works. The more specific you are, the better the initial mask.

Segmentation Threshold (default: 0.3) Controls how confident the detector needs to be before it considers something a match. Want tighter detection that only grabs strong matches? Raise it toward 0.5 or 0.6. Getting missed detections where the subject is partially cut off? Drop it to 0.2. Start with the default and adjust if the first-frame preview looks wrong.

Warmup Frames (default: 10) The number of frames MatAnyone 2 uses to stabilize before it starts producing final output. Higher values give the model more context to lock onto the subject. For most clips, 10 is fine. For videos where the subject enters the frame gradually or lighting shifts early on, try 15 to 20.

Erode / Dilate (default: 0 / 0) Shrinks or expands the mask boundary. Want to trim edge artifacts or color spill from the original background? Set erode to 1 or 2. Want to include more of the subject boundary (hair, loose clothing)? Set dilate to 1 or 2. These are small pixel adjustments. A little goes a long way.

Max Internal Size (default: -1) Controls the internal processing resolution. At -1, there is no limit and the model processes at full resolution. If you are running into memory issues on longer clips, set this to 720 or 960 to cap the internal resolution.

Max Memory Frames (default: 5) How many past frames the model keeps in memory for temporal consistency. Higher values can improve stability on long clips but use more VRAM. For short clips under 10 seconds, 5 is enough. For longer footage, try 8 to 10.

Resize (Longer Side, default: 960) The input video gets resized so its longer side matches this value before processing. Lower values speed things up. Higher values preserve more detail. 960 is a good balance for most use cases.

What is MatAnyone 2 video matting good for?

MatAnyone 2 is built for production video matting where edge quality matters. It handles hair strands, semi-transparent fabrics, and motion-blurred limbs without turning them into hard cutouts. Best suited for compositing work, VFX, and any project where clean alpha extraction from real footage is the goal.

Product videos where you need to drop in different backgrounds per market or season. Film and VFX compositing where rotoscoping by hand would take hours. Social content where you want a clean subject over a new scene.

It works on both camera footage and AI-generated video. Backlit scenes, fast motion, and changing lighting conditions are all handled well.

The catch: this is a matting workflow, not a background replacement workflow. You get the extracted subject and matte. Compositing onto a new background is a separate step. And because it segments from a single text prompt on the first frame, it works best when the subject is visible from the start. If the subject enters mid-video, adjust the mask_frame setting to point at a frame where the subject is clearly visible.

Built on MatAnyone 2 by Peiqing Yang, Shangchen Zhou, Kai Hao, and Qingyi Tao (CVPR 2026). ComfyUI integration by FuouM.

FAQ

What video lengths can MatAnyone 2 handle? There is no hard limit on video length. The memory propagation system processes frame by frame, so longer videos take more time but do not require more VRAM proportionally. For clips over 30 seconds, consider raising max_mem_frames to 8 or 10 for better temporal consistency.

Does MatAnyone 2 work on non-human subjects? The segmentation step (GroundingDINO + SAM) can detect any object you describe in text. The matting model itself is trained primarily on human subjects, so edge quality on hair and skin is strongest. Non-human subjects like animals or objects still work, but boundary detail may be less refined.

What is the difference between the green screen and matte outputs? The green screen output places your extracted subject on a solid green background, ready for chroma keying in your editor. The matte output is a grayscale alpha channel where white is fully opaque and black is fully transparent. Use the matte for direct compositing in tools like After Effects, Nuke, or DaVinci Resolve.

Can I change the background color from green? Yes. The solid color node in the workflow defaults to green (RGB 0, 255, 0). You can change this to any color that works for your compositing pipeline. Blue is common for subjects wearing green.

How do I run MatAnyone 2 video matting online? You can run MatAnyone 2 video matting online through Floyo. No installation, no setup. Open the workflow in your browser, upload your video, and hit run. Free to try.

Read more

N