zhenzhen-bria-video-background-removal-v3-fal
Alpha cutouts per clip, no local segmentation
- video
- video
- video_url
- response
Background removal is the most commoditized operation in this whole ecosystem - the KB calls it "a problem that looks solved until you hit hair, fur or anything semi-transparent." For stills, you've got a dozen local options (BiRefNet, InSPyReNet, rembg) and ComfyUI even added native support. For video it's a different story: cutting a subject out of every frame, keeping the matte stable across motion, and doing it with an alpha you can composite on - that's where local tooling gets fiddly and slow. This node just delegates the whole thing to BRIA's bria/video/background-removal/v3 endpoint through the Zhenzhen API. Upload a clip, get back a cutout.
Why reach for it instead of a frame-by-frame BiRefNet loop? Temporal consistency. A per-frame model flickers on hair and semi-transparent edges because every frame is decided independently; a video-specialized matting model keeps the edge stable across frames, which is exactly what makes the difference between a cutout you can use and a cutout that shimmers. If you're compositing a talking head onto a fake background, or building green-screen-less product video, this is the fast path.
How it works
The flow is the standard Zhenzhen FAL pattern: give it a video (via the video input or a video_url), it uploads it to the workshop's file service, POSTs to the proxy, polls until the job finishes, then hands back a VIDEO plus the hosted video_url. You don't even need to connect a video - video_url is the required field and is ignored whenever a video input is wired in.
Inputs and outputs that matter
background_color- the interesting one. DefaultBlack, withTransparentfirst in the list. If you're compositing later, pickTransparent(or one of the 9 solid colors if the video host you're feeding can't handle alpha).output_container_and_codec- ten options. Default iswebm_vp9, which is the right call for transparent output in most pipelines (mp4 can't carry alpha). If you're feeding a compositor that wants ProRes,mov_proresksis there. Need a quick shareable loop?gif.preserve_audio- on by default, keeps the original track. Turn it off if the clip's audio is garbage and you'll replace it anyway.video_way-upload(default) sends your file;video_urllets you point straight at a hosted clip and skip the upload.poll_interval/max_poll_attempts- the timeout budget. Default is 600 polls × 6s = an hour, which is a lot of patience for a short clip; you can trim it.skip_error- on, failures return a blank video and log instead of killing your batch.
Outputs: video (the cutout clip as a VIDEO tensor, ready for save or compositing), video_url (hosted file), and response (raw JSON).
Installing it
One pack, one clone:
cd ComfyUI/custom_nodes
git clone https://github.com/T8mars/Comfyui-zhenzhen
Restart ComfyUI, or install "Comfyui-zhenzhen" via ComfyUI Manager. No model downloads - the matting happens on BRIA's servers.
Common issues
Pack-level gotchas: you need a Zhenzhen account with credit; the overseas API can throw 443 from some networks (VPN with TUN mode); 500s on first run are usually upstream - re-run.
For this node specifically, the two traps are container and color. Transparent video only works if the container supports alpha - mp4_h264/mp4_h265 cannot carry it, which is why the default is webm. And if your cutout comes back with a hard black edge, you almost certainly chose Black as the background color instead of Transparent; solid colors are for when you want to key it out later, not for actual removal. One more: video_url is required, so if you only have a local file, wire the video input or the node will sit there waiting for a URL that never comes.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| video_url | STRING | Public video URL. Ignored when video input is connected. | |
| videoopt | VIDEO | — | |
| api_keyopt | STRING | — | |
| background_coloropt | COMBO | Black | 11 options: Transparent, Black, White, Gray, Red, Green, +5 |
| preserve_audioopt | BOOLEAN | true | — |
| output_container_and_codecopt | COMBO | webm_vp9 | 10 options: mp4_h265, mp4_h264, webm_vp9, mov_h265, mov_proresks, mkv_h265, +4 |
| video_wayopt | COMBO | upload | 2 options: upload, video_url |
| poll_intervalopt | INT | 61–60 | — |
| max_poll_attemptsopt | INT | 60010–3600 | Default 600*6s = 3600s timeout. |
| skip_erroropt | BOOLEAN | false | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| video | VIDEO | — |
| video_url | STRING | — |
| response | STRING | — |