Nodes/Faceless Node for ComfyUI/Remove Background (Video)
ComfyUI Node

Remove Background (Video)

Cutting the backdrop out of a clip, frame by frame

By jeffy5·Created 2 years ago·Updated 4 months ago· 61
Remove Background (Video)
  • video
  • video

The video sibling of Faceless Remove Background, applying the same no-config cutout to every frame of a clip instead of one still image. In this pack's pipeline it most naturally slots in right before Merge Videos: strip the background off a video you've already run through a face swap, then hand the result to Merge Videos to drop it onto a new backdrop - the video equivalent of a green-screen composite.

How it works

Same single bundled segmentation model as the still-image version (rmbg.pth, per the README's model list), just looped over every frame of a FACELESS_VIDEO instead of run once. There's no per-frame configuration exposed - no threshold, no model choice - which is convenient in that you're not babysitting settings across a whole clip, but also means there's nothing node-side to fix if a particular frame's mask comes out ragged. Whatever the model gets right or wrong on a given frame, it does consistently for every frame.

Inputs and outputs

  • video - the clip to process, as a FACELESS_VIDEO.

Output: a video (FACELESS_VIDEO) with the background removed. Note the type - this is the pack's own custom video handle, not a standard IMAGE batch and not another pack's video type, so it only plugs directly into other Faceless nodes. If you need to hand the frames to something outside this pack, route through Load Images (Video) first to convert to plain IMAGE.

This node is also flagged internally as an output node, so ComfyUI will execute it even with nothing wired downstream from it - worth knowing if you're chaining it purely for its side effects rather than to feed the next node in a visible pipeline.

Installing it

Manager: search Faceless Node for ComfyUI. By hand:

cd ComfyUI/custom_nodes
git clone https://github.com/jeffy5/comfyui-faceless-node
pip install -r requirements.txt

The model lives in ComfyUI/models/faceless/, same as the rest of this pack - not ComfyUI's normal model directories. Run download_models.py (default set covers this one) and restart ComfyUI.

Where people get burned

No live preview. This pack doesn't support an in-graph video preview for any node - the README says so plainly. To actually check whether the cutout looks right before running a long clip through it, route the output through Load Images (Video) into a PreviewImage node in parallel, rather than waiting to save the whole thing and opening it externally.

Runtime scales with clip length. Since it's a per-frame pass with no shortcuts exposed, a 10-second clip costs roughly 10x a 1-second one - there's no way to trade that off from this node's inputs.

Bad composites usually trace back here, not to Merge Videos. If you're chaining this into a background swap and the final composite looks wrong, check this node's cutout quality in isolation first - a rough mask upstream is the more likely culprit than the merge step itself.

Categoryfaceless

Inputs (1)

NameTypeDefaultDescription
videoFACELESS_VIDEO

Outputs (1)

NameTypeDescription
videoFACELESS_VIDEO