PIK Keyer
The IBK-style keyer for green screens even a simple chroma key can't hold
- video
- clean_plate_video
- clean_plate
- in_mask
- out_mask
- bg_video
- video
PIK Keyer is the pack's heavyweight for green/blue screen work, modeled on the classic IBK (image-based keyer) / Primatte approach used in pro compositing. The difference from a plain chroma key: instead of judging every pixel by a single screen color, it can compare your footage against a clean plate (a shot of the empty screen) and use garbage masks to force regions fully in or fully out. That's how you get edges on hair, translucency, and spill that a one-color key just eats.
It also handles the two things that usually follow a key - despill (removing the green glow from your subject's edges) and replace (filling the removed spill with a chosen color or the background) - so it's a full keying bench in one node.
How the two modes work
There are two operating modes, chosen automatically by what you wire in:
- Full clean-plate mode - wire any side input (
clean_plate_video,clean_plate,in_mask,out_mask, orbg_video) and it runs the complete IBK pipeline: screen subtraction, clean-plate comparison, garbage masks, despill, replace. - Fast single-image mode - leave all side inputs empty and it falls back to a quick, live-previewable key using just the screen color. Great for roughing a key before committing to the full pass.
Side inputs, for reference: video (the plate to key), clean_plate_video / clean_plate (empty screen as video or still), in_mask (force opaque), out_mask (force transparent), bg_video (background when output is composite).
The parameters that matter
screen-green(default),blue, orpickwith your ownpick_color(hex, default#00FF00).red_weight/blue_green_weight- how the screen channel separates from the rest. Both default 0.5, range -1..2. Nudge to firm up the matte without eating the subject.alpha_bias/despill_bias- neutral-color references (default#808080gray). Set them toward your subject's neutral tone to cut spill.use_alpha_bias(on by default) makes the alpha bias also drive despill.screen_subtraction- on by default; subtracts the screen contribution for a cleaner core matte.clip_black/clip_white- matte clip points, 0–1. Pull them in slightly to crush noise in the matte.replace_mode-none,source,hard, orsoft(default);replace_coloris the fill for hard/soft.output-alpha(real transparency, default),matte(grayscale mask),premult, orcomposite(rendered over the background).
One output: video (COMFYTV_VIDEO).
The troubleshooting note worth memorizing
The pack's docs flag this explicitly: alpha output needs the VP9 encoder - if it errors, switch output to matte. That's the kind of error message that looks like an install problem and isn't. And remember the pack rule: native ComfyUI video in/out requires a Bridge node.
Install
Pack-wide one-liner:
cd ComfyUI/custom_nodes
git clone https://github.com/jtydhr88/ComfyTV
Restart ComfyUI - Desktop/macOS users: clone into the running instance by absolute path, verify __init__.py at the top level, and restart the backend fully. ComfyUI Manager finds it as "ComfyTV". No extra Python dependencies.
Realistic advice: for a solid green screen with flat lighting, the fast single-image mode is genuinely enough - don't over-build. Break out the clean plate and garbage masks when you're fighting hair, motion blur, or a wrinkled backdrop. That's what this node is for.
Inputs (22)
| Name | Type | Default | Description |
|---|---|---|---|
| force_run_token | INT | 00–2147483647 | Internal — bumped on Run to invalidate ComfyUI's input cache. |
| project_id | STRING | Internal — populated by the projectStore on the frontend. | |
| parent_output_id | INT | 00–2147483647 | Internal — lineage parent set by spawn handlers on the frontend. |
| screen | COMBO | green | 3 options: green, blue, pick |
| pick_color | STRING | #00FF00 | — |
| red_weight | FLOAT | 0.50-1–2 | — |
| blue_green_weight | FLOAT | 0.50-1–2 | — |
| alpha_bias | STRING | #808080 | — |
| despill_bias | STRING | #808080 | — |
| use_alpha_bias | BOOLEAN | true | — |
| screen_subtraction | BOOLEAN | true | — |
| clip_black | FLOAT | 0.000–1 | — |
| clip_white | FLOAT | 1.000–1 | — |
| replace_mode | COMBO | soft | 4 options: none, source, hard, soft |
| replace_color | STRING | #808080 | — |
| output | COMBO | alpha | 4 options: alpha, matte, premult, composite |
| videoopt | COMFYTV_VIDEO | — | |
| clean_plate_videoopt | COMFYTV_VIDEO | — | |
| clean_plateopt | COMFYTV_IMAGE | — | |
| in_maskopt | COMFYTV_IMAGE | — | |
| out_maskopt | COMFYTV_IMAGE | — | |
| bg_videoopt | COMFYTV_VIDEO | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| video | COMFYTV_VIDEO | — |