hjbhjh shared this post · 1h ago
Last_T_Rex

I built a ComfyUI node for AI roto: click one person, get a native 4K hair matte (SAM3 + LTX-2.5 alpha-gen, open source)

I'm a VFX compositor, and hair on a busy plate is the roto job nobody wants. So I built a node that does the first pass.

How it works:

- Click the person on the plate (alt-click cuts a part, shift-click adds a prop). SAM3 picks them.

- The other people get inpainted out of a copy of the plate, then LTX-2.5 alpha-gen draws the edge of the one person left. On its own LTX mattes everyone in frame, so this is how you aim it.

- On 4K plates it runs LTX again on native 1920x1088 tiles along the edge, so the strands are real, not upscaled.

- Overlap mode handles hair or hands crossing another person. Depth Anything decides who's in front.

On a 247-frame shot the edge detail match was 88.7%, against 45.0% for SAM3 + ViTMatte and 29.4% for a plain SAM3 mask.

Runs on 12 GB VRAM and 16 GB RAM, EXR in and out, plate frame numbers kept. Open weights only, GPL-3.0. It's in the Manager as "Comfy Pro Alpha Generator".

Repo: https://github.com/rik-python/ComfyUI-Comfy-Pro-Alpha-Generator

Full demo with chapters: https://youtu.be/2EGYEsRpmTw

If you throw a shot at it, tell me where it breaks.

48 15
karijoart this looks cleverly built and the video presents it very well. Great work and thanks for sharing 3h ago 1 like
Last_T_Rex Author Thank you so much! 3h ago 1 like
Any-Scar765 Has `sam` already broken down and stopped supporting multi-selection? ))) 2h ago 1 like