ComfyUI Node
CorridorKey
Refines a coarse per-frame alpha hint into CorridorKey FG, Matte, Processed, and QC passes. The alpha hint should be rough, slightly eroded, and soft rather than tightly expanded.
CorridorKey
- image
- mask
- fg
- matte
- processed
- QC
◄gamma_space▾►
◄despill_strength1.00►
◄refiner_strength1.0►
◄auto_despeckle▾►
◄despeckle_size400►
CategoryCorridorKey
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | Input RGB image or image batch to refine. | |
| mask | MASK | Coarse Alpha Hint for the current frame. Keep it rough, soft, and slightly eroded. For batched images, provide one matching mask per frame. | |
| gamma_space | COMBO | Interpret the incoming image as sRGB or already-linear before the fixed 2048x2048 inference pass. | |
| despill_strength | FLOAT | 1.000–1 | Green despill amount after inference. 0 disables despill, 1 is the standard default. Higher values are stronger and can push heavy spill toward magenta or purple. |
| refiner_strength | FLOAT | 1.00–4 | Scales the learned refiner delta. 1.0 is the standard default behavior. |
| auto_despeckle | COMBO | Enable connected-component cleanup on the predicted alpha matte. | |
| despeckle_size | INT | 4000–4096 | Minimum island area in pixels to preserve when auto-despeckle is enabled. 400 is the standard default. |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| fg | IMAGE | Raw straight foreground color. The model predicts this in sRGB space; convert to linear before manual compositing with the matte. |
| matte | MASK | Raw linear alpha matte. |
| processed | IMAGE | Linear foreground premultiplied by the linear matte for quick preview and simple downstream export. |
| QC | IMAGE | QC preview composite over a checkerboard in sRGB. |