Matte Monitor
Look at the key before you trust the composite
- video
- video
Matte Monitor is the smallest node in ComfyTV's keying suite, and skipping it is how you end up with a composite you can't explain. The whole discipline of pulling a clean key is inspecting the matte - the black-and-white alpha - before you ever put the subject over a background. This stage does exactly that: it takes your keyed video and outputs the alpha as a video you can actually look at, with a single control for how it's displayed.
ComfyTV is the canvas-style app layer on ComfyUI where every operation is its own node. In the keying chain (Keyer → Matte Morphology → Key Mix) Matte Monitor is the QC checkpoint you slot in after the Keyer: pull the key, monitor the matte, fix it, then composite.
How it works. It renders the alpha channel of the input as a grayscale video: pure white where the subject is fully opaque, pure black where it's fully transparent, and all the messy grays in between - which is exactly where your problems live. A soft, noisy or holey matte is obvious the moment you see it in black and white, and invisible when you're staring at the full-color composite. The single slope control (0–1, default 0.5) adjusts the display's contrast ramp on the matte, which is a view aid - it doesn't change the underlying key, just how the grays read on screen, useful for spotting near-transparent regions that are eating the subject's edge.
The inputs that matter. The force_run_token, project_id and parent_output_id inputs are internal plumbing. The real ones:
video- the keyed footage to monitor (required; the node errors without it).slope- display contrast on the matte, 0–1.
Output is a video - the matte itself, which you can also reuse as a mask input further down the chain.
Install. Install the pack once:
cd ComfyUI/custom_nodes
git clone https://github.com/jtydhr88/ComfyTV
Restart ComfyUI (full restart, not a browser refresh) and the stage appears under ComfyTV → Keying. ComfyUI Manager - search "ComfyTV" - works too. Zero Python dependencies (the pack's pyproject.toml dependency list is empty) and no model files - it's a display transform on your GPU. Desktop/multi-install users: clone into the running instance's path from the startup log or the node won't register.
Where people get burned. The most common "failure" is really a workflow miss: someone wires the Keyer straight into Key Mix, skips monitoring, and then fights a fringe they can't diagnose - because it was visible in the matte all along. Run it after the Keyer and before cleaning up; the gray edge noise you see there is the thing Matte Morphology fixes. Second: slope is a display aid, not a keying parameter - don't expect it to change the actual composite. And one genuine gotcha: the node outputs the matte, so if you're using it as the final "view", you're watching alpha, not the composite - switch the Keyer's output to composite (or add Key Mix) when you want the finished picture.
Inputs (5)
| 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. |
| slope | FLOAT | 0.500–1 | — |
| videoopt | COMFYTV_VIDEO | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| video | COMFYTV_VIDEO | — |