H3 Transparent Video - SatoDive
Real alpha out of a video model, without the haze
- images
- video
- audio
- keep_mask
- garbage_mask
- pass_b
- preview_plate
- foreground
- alpha
- rgba
- preview
- report
You cannot get an alpha channel out of a diffusion video model. Video transparency has been its own research line for years - TransPixar and friends - and the practical route everyone uses is the boring one: generate over a flat backdrop, then key it. H3 Transparent Video is that second half, in one node.
Why it matters. The instinct is to reach for a segmentation model instead - BiRefNet, InSPyReNet, RMBG - and it fails on video for a structural reason: a segmentation model labels each pixel foreground or background, and matting predicts fractional alpha. Smoke, motion blur, a thin veil, a spark trail are neither solid nor absent, and a hard mask can't say so. Keying against a modelled backdrop can.
How it works
A generated clip never has a truly flat background - it has gradients, vignettes and shading - so the keyer models the backdrop instead of assuming a colour. keyer.py reads the frame border across up to a dozen frames, robustly, and reports a border-match confidence. It then estimates a per-frame clean plate at low resolution from confident backdrop pixels, fills the holes the subject punched in it with push-pull, and smooths it in space and time. Every pixel is compared against its own local backdrop. That is the mechanic that kills haze: a flat key colour leaves a faint veil wherever the generation was slightly off-green; a per-pixel plate doesn't.
The key itself is colour-difference "screen" keying for green and blue, unmultiply for glow on black, and the mirror for smoke and ink on white. Then the cleanup: a colour-guided filter that snaps the matte to full-resolution edges (repairing 4:2:0 chroma blockiness), motion-gated temporal smoothing so moving edges don't ghost, despill, a proper un-mix of the foreground out of the plate - F = (C - (1-a)P) / a - and colour extension under near-transparent pixels so edges don't pick up a dark fringe when you scale or composite. The docstring makes an unusually honest argument for one pass over two-render triangulation: a diffusion model can't re-render a background behind a held subject, because holding the subject holds whatever was behind its soft edges.
The inputs you'll actually touch
backdrop first, matching what H3 Shot wrote into your prompt; Auto reads it from the border and usually gets it right. Then images (frames straight out of VAE Decode - no intermediate MP4 loss) or video, plus audio. output_format is the real decision: ProRes 4444 for Premiere/AE/Resolve/Final Cut, RGBA PNG sequence, or "Don't save (preview only)". filename names a numbered folder under output/H3_Transparent_Video/; fps at 0 takes the rate from the video input, or assumes 24 for images; leave alpha_type on Straight.
Everything else you touch when something is wrong. screen_gain is the master strength - raise it if a faint veil survives, lower it if thin or soft parts vanish. plate_fix at 1 is the full per-pixel backdrop model. clip_black (0.03) clears leftover haze; clip_white (0.95) fills faint holes. despeckle, despill, choke, softness, shadows, temporal and edge_solve are the usual keyer controls, and keep_mask / garbage_mask accept masks from any segmentation node.
Outputs
foreground (RGB), alpha (MASK), rgba (composite-ready frames), preview (composited over what preview_on says - Checkerboard, Grey, Black, White, or your preview_plate), and report. Read the report: backdrop kind and hex, border-match percentage, haze and flicker numbers, plate unevenness, and any warnings. It also lands in report.txt next to the renders.
Installing
cd ComfyUI/custom_nodes
git clone https://github.com/SatoDive/Minimax-H3-Transparent-Video
Restart. No extra Python packages - torch, numpy, Pillow and av, all bundled - and no model downloads. The README points at a ready workflow (workflows/H3_Generate_Transparent_Clip.json, plus a Patreon download); the chain it documents is H3 Shot → sampler → VAEDecode → this node, with VAEDecodeAudio alongside.
Where it bites
Leftover dots after keying is the classic complaint, and not specific to this pack - a July 2026 thread about Krea 2 green-screen output had the same symptom in Resolve, with commenters split between matting nodes and "green screen is honestly more hassle than just masking directly in post." Cheap fixes first: raise screen_gain, lower clip_black, raise despeckle, and read the report's border-match percentage.
Holes in the subject mean it contains the backdrop colour - green clothing on green screen. Switch to Blue, use keep_mask, lower clip_white, or fill_holes.
Fire, sparks and orange glow belong on Black, not green; dark-grey objects on White come out partly transparent by design, because that mode is for ink, smoke and dust.
Check the report if a Pro-only setting looks ignored. The source has an edition switch: on a Free build, custom colour falls back to Auto, edge solve / temporal / fill holes / keep and garbage masks are skipped, WebM and QuickTime Animation save as ProRes 4444, and only the first 124 frames get keyed.
Inputs (30)
| Name | Type | Default | Description |
|---|---|---|---|
| backdrop | COMBO | Auto | What the clip was generated on. Auto reads it from the frame border. |
| custom_color | STRING | #00B140 | Only for 'Custom colour': the backdrop colour as hex. |
| screen_gain | FLOAT | 1.000.5–2 | How strongly the backdrop is removed. Raise if a faint veil remains, lower if thin or soft parts disappear. |
| screen_balance | FLOAT | 0.000–1 | 0 compares the key channel with the strongest other channel (protects yellows and cyans). Raise toward 1 for softer, more transparent edges. |
| shadows | COMBO | Keep | Shadows on a green/blue backdrop: Keep exports them as soft dark alpha, Remove drops them (slightly thins very dark edges). |
| plate_fix | FLOAT | 1.000–1 | Compensate an uneven backdrop (gradients, vignette). 1 = full per-pixel plate. |
| clip_black | FLOAT | 0.0300–0.5 | Alpha below this becomes fully clear. Removes leftover haze. |
| clip_white | FLOAT | 0.9500.5–1 | Alpha above this becomes fully solid. Fills faint holes in the subject. |
| edge_solve | BOOLEAN | true | Solve motion-blurred and anti-aliased edges of strongly coloured subjects (red car, orange fire) from the local subject colour. Without it such edges come out too hard with a dark fringe. |
| edge_detail | INT | 20–8 | Edge-aware refinement radius in pixels: snaps the matte to image edges. 0 = off. |
| choke | FLOAT | 0.00-4–4 | Shrink (+) or grow (-) the matte, in pixels. |
| softness | FLOAT | 0.000–4 | Blur the final matte edge, in pixels. |
| despill | FLOAT | 1.000–1 | Remove backdrop colour reflected onto the subject (green/blue spill). |
| edge_extend | BOOLEAN | true | Fill colour under near-transparent pixels from the subject, so edges never show a dark or coloured fringe after compositing or scaling. |
| despeckle | INT | 80–200 | Remove isolated faint specks up to this area in pixels. Strong sparks are kept. |
| temporal | FLOAT | 0.500–1 | Smooth matte flicker across frames. Motion-aware, so moving edges do not ghost. |
| output_format | COMBO | ProRes 4444 (.mov) - Premiere/AE/Resolve | ProRes 4444 carries real alpha in Premiere, After Effects, Resolve and Final Cut. MP4/H.264 can never be transparent. |
| filename | STRING | h3_transparent | Project folder name under output/H3_Transparent_Video. Each run gets a new numbered folder. |
| fps | FLOAT | 0.0000–120 | 0 = take it from the video input, or 24 (H3) for images. |
| alpha_type | COMBO | Straight (recommended) | Straight is what editors expect for ProRes 4444 and PNG. |
| preview_on | COMBO | Checkerboard | Background for the preview output and the in-node player. |
| preview_video | BOOLEAN | true | Also write small preview/matte MP4s for the player inside the node. |
| fill_holes | INT | 00–16 | Fill pinholes enclosed by the subject, up to about this radius in pixels. Fixes black specks in yellow fire keyed from green. 0 = off, 3-6 is typical. Open notches and gaps between separate shapes are never filled. |
| imagesopt | IMAGE | Frames straight from VAE Decode (best quality). | |
| videoopt | VIDEO | Or a loaded video; its audio and fps are used. | |
| audioopt | AUDIO | Muxed into the saved file. | |
| keep_maskopt | MASK | Optional: areas that must be solid (from any segmentation node). | |
| garbage_maskopt | MASK | Optional: white where the subject may be; everything black is forced clear. | |
| pass_bopt | IMAGE | Advanced: the same shot over a second backdrop. Used for exact triangulation only where both passes agree. | |
| preview_plateopt | IMAGE | Optional background for 'Plate input' preview. |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| foreground | IMAGE | — |
| alpha | MASK | — |
| rgba | IMAGE | — |
| preview | IMAGE | — |
| report | STRING | — |