Nodes/MediaKit Toolkit/Matte · 绿幕抠图
ComfyUI Node

Matte · 绿幕抠图

Green screen to transparent video, no chroma-key math on your side

By fudanll-sys·Created about a month ago·Updated 26 days ago· 1
Matte · 绿幕抠图
  • video
  • video
output_formatWEBM
poll_interval_seconds10
max_poll_attempts720

The matte nodes are the rare video operation this pack does that's genuinely awkward to do well locally: they hand back a transparent-background video, alpha channel and all. The greenscreen variant is the easy case - your footage already has a clean keyable background - so the cloud model's whole job is edge quality and temporal stability. You give it a green-screen (or solid-color-background) clip, it returns a transparent video you can drop onto any background.

The input that matters

  • output_format - WEBM (default) or MOV, the two transparent video containers. This is the only real decision you make here, and it's about your downstream, not the matte quality. WEBM (VP9 with alpha) plays nearly everywhere in browsers and most players; MOV (the ProRes-style path) is what editing software expects. If you're compositing in a video editor, pick MOV; if you're serving it on the web or feeding another ComfyUI node, WEBM is safer.
  • Then just video plus the pack's standard poll_interval_seconds (default 10) and max_poll_attempts (default 720).

The single output is video - a native VIDEO with transparency - straight into a Save Video node.

How it works

Same machinery as everything else in this pack: the clip materializes to a temp file, mediakit-cli submits an async matting task (matte-greenscreen-video) to your MediaKit account, the node polls, downloads the transparent result, and converts it back to a native VIDEO object. No local model, no GPU work - the segmentation happens on Volcengine's side, and running it bills your account by usage.

Install and the cloud setup

Via ComfyUI Manager, search "MediaKit Toolkit" / mediakit-toolkit, fully restart - or:

cd ComfyUI/custom_nodes
git clone https://github.com/fudanll-sys/comfyui-mediakit-toolkit.git

No Python dependencies, no model downloads. You need a Volcengine account with AI MediaKit activated, an API key, and the CLI installed and authed in the environment that launches ComfyUI:

npx @volcengine/mediakit-cli install -y
mediakit-cli init --mode cloud-first --api-key "YOUR_MEDIAKIT_API_KEY" --credential-store config --yes

Where it fits, and the catch

Locally, image matting is essentially solved and free - BiRefNet, rembg, take your pick - but video matting is a different beast: per-frame models wobble and shimmer exactly the way per-frame upscalers do, and you get a transparent sequence only if something keeps the alpha consistent across frames. That temporal consistency is the cloud model's value, and it's real. The catch is the same one the whole pack carries: your footage goes to Volcengine and it costs money. Also, and this trips people up - this node is for footage that is green-screened. If you're pointing it at normal footage with an arbitrary background, you want the portrait matte node instead. Match the node to the footage and you'll get edges worth keeping.

CategoryMediaKit/Video AI

Inputs (4)

NameTypeDefaultDescription
videoVIDEO
output_formatCOMBOWEBM透明视频输出格式。
poll_interval_secondsINT102–60
max_poll_attemptsINT7201–5000

Outputs (1)

NameTypeDescription
videoVIDEO