CorridorKey workflow for After Effects: AI keying in your AE compositing pipeline
After Effects ships with Keylight, and Keylight is good. On a well-lit green screen with clean edges, it pulls a solid key in minutes. Most shots do not need anything else.
But some shots fight back. A subject with curly hair blowing in a fan. A sheer fabric catching light behind it. Motion blur along the arms during a fast gesture. These are the shots where you spend an hour tweaking Keylight parameters, stacking multiple keys, hand-rotoing edges, and still ending up with a matte that looks crunchy or fringing that bleeds onto the new background.
CorridorKey handles those shots. It uses neural unmixing to reverse the physical blending of foreground and background light, producing clean mattes on footage that color-based keyers struggle with. It is not a Keylight replacement. It is the tool you reach for when Keylight is not enough.
This guide walks through the full workflow for using CorridorKey-based tools alongside After Effects, from identifying problem shots through final composite.
CorridorKey implementations for AE users
You have three categories of tools that bring CorridorKey-style AI keying into an After Effects workflow.
After Effects plugins
Baskl.ai and Blace.ai have built plugins that run directly inside After Effects. These apply neural unmixing as an effect on your layer, similar to how you would apply Keylight. The advantage is zero round-tripping. You stay inside AE the entire time. The disadvantage is that you are limited to whatever interface and controls the plugin developer exposes.
Standalone GUI tools
Desktop applications that process your footage outside AE and export keyed results for import. EZ-CorridorKey is the most prominent example, with 4,000+ stars on GitHub and downloads on Gumroad. It supports both green and blue screen keying as of v2.0, includes 6 alpha generators for creating the coarse mask the neural network needs, and runs on consumer GPUs. It is source-available and still a work in progress.
Other standalone GUI forks exist. Search GitHub for "CorridorKey" to see what is currently active.
The original CLI
The original CorridorKey by Corridor Digital is a Python command-line tool. It requires 24GB+ of VRAM and manual setup of Python, CUDA, and model weights. If you are comfortable in a terminal and have the hardware, this gives you the most direct access to the neural unmixing model. For most AE editors, the GUI tools or plugins are a better fit.
Step-by-step standalone workflow
If you are using a standalone CorridorKey tool (not a plugin), the process follows a consistent pattern regardless of which specific fork you choose. The steps below use generic terms. The exact button labels and menus will vary by tool.
1. Identify problem shots in your AE comp
Scrub through your timeline. Apply Keylight to each green screen layer and do a quick pull. Most shots will key fine. Flag the ones that do not. Common red flags:
☼ Hair edges that show green fringing no matter how much you adjust Screen Matte parameters ☼ Motion blur frames where the matte breaks down into a jagged mess ☼ Translucent materials (veils, glass, thin fabric) that Keylight either removes entirely or keys with visible artifacts ☼ Uneven green screen lighting that forces you to pull multiple keys and combine them
These are your CorridorKey candidates. Leave the clean shots on Keylight. There is no reason to process footage through a neural network when a traditional keyer already gives you a good result.
2. Export the green screen plate as a PNG sequence
Select the problem layer in your After Effects comp. You need to export the raw green screen footage, before any keying effects.
☼ Disable all effects on the layer (or solo the layer with effects off)
☼ Go to Composition > Add to Render Queue
☼ Under Output Module, click the format link. Set Format to PNG Sequence
☼ Set Channels to RGB (you do not need alpha at this stage, the CorridorKey tool will generate it)
☼ Set the output path to a dedicated folder. Name it clearly, something like shot_12_green_plate
☼ Match your comp settings: resolution, frame rate, pixel aspect ratio. Do not resize or reinterpret
☼ Click Render
For shots with subtle transparency gradients (sheer fabric over the green screen, semi-transparent glass), consider exporting as EXR instead of PNG. EXR stores floating-point color data, which preserves more precision in the color channels. The neural unmixing can use that extra precision to produce a more accurate separation. PNG is 8-bit and sufficient for most shots.
3. Process in the CorridorKey tool
Open your standalone CorridorKey application and load the PNG sequence you exported.
☼ Point the tool at your exported frame folder ☼ Select the screen color (green or blue, depending on your footage) ☼ Choose an alpha hint generator. Most tools offer several options. If you are unsure, start with the default ☼ Run a test batch on 3-5 frames before processing the full sequence. Check the output for quality before committing to a full render ☼ Process the entire sequence
The tool will output two things: a foreground image sequence (the subject with the green screen removed, replaced with black or transparent) and an alpha matte sequence (a grayscale image where white is fully opaque and black is fully transparent).
Some tools output these as separate sequences. Others combine them into a single RGBA image. Either format works for the next step.
4. Import the results into After Effects
Back in After Effects:
☼ File > Import > File. Navigate to the output folder from the CorridorKey tool ☼ Select the first frame of the foreground sequence. Check "PNG Sequence" (or "EXR Sequence") in the import dialog. AE will recognize it as a sequence ☼ Do the same for the alpha matte sequence if it is a separate output ☼ Verify the imported sequences match your comp's frame rate. Right-click the footage item in the Project panel, choose Interpret Footage > Main, and confirm the frame rate
5. Set up the composite with Track Matte
Place the foreground sequence on a layer in your comp. Place the alpha matte sequence on the layer directly above it.
☼ On the foreground layer, set the Track Matte (TrkMat column in the timeline) to "Luma Matte" from the alpha layer above ☼ The alpha layer will automatically become invisible. The foreground layer now uses the alpha sequence to control its transparency ☼ Place your new background on a layer below
If the TrkMat column is not visible in your timeline, right-click the column headers and enable "Modes" or press F4.
6. Alternative: Set Matte effect
Track Mattes work but are rigid. If you need more control, use the Set Matte effect instead.
☼ Place both the foreground and alpha sequences in your comp (the alpha can be on any layer, not just the one directly above) ☼ Apply Effect > Channel > Set Matte to the foreground layer ☼ Set "Take Matte From Layer" to your alpha sequence layer ☼ Set "Use For Matte" to Luminance ☼ Check "Invert Matte" if the transparency is reversed
Set Matte is more flexible because the matte layer can live anywhere in the layer stack and you can apply additional effects to the matte before it is used.
7. Finishing touches
A raw composite from any keyer, traditional or AI, needs finishing work. The following steps apply regardless of how you generated the matte.
Light wrap. When a foreground subject is composited over a bright background, real light would wrap around their edges. Without light wrap, the subject looks cut out and pasted. In AE, you can build light wrap with a duplicate of the background layer, heavily blurred, set to a blending mode like Screen or Add, and masked to affect only the edges of the foreground.
Edge blur. A slight blur (0.5-1px) on the matte edges softens any remaining hard transitions. Apply a Simple Choker (Effect > Matte > Simple Choker) with a small negative value to contract the matte by half a pixel, then a slight Feather.
Color correction. Match the foreground color temperature and exposure to the new background. Curves, Levels, or Color Balance (HLS) on the foreground layer. The goal is to make the subject look like they were actually photographed in the new environment.
Spill suppression. CorridorKey handles green spill better than traditional keyers during the unmixing process, but some residual color contamination may remain. Use AE's built-in Spill Suppressor effect or a third-party option if needed.
Dynamic Link workflow for Premiere users
If your editorial timeline lives in Premiere Pro and you use After Effects for compositing, Adobe Dynamic Link lets you skip the image sequence export from Premiere. Create a new After Effects comp via Dynamic Link, do your keying work there, and the result appears live in the Premiere timeline.
However, this only helps with the Premiere-to-AE handoff. You still need to export from AE to process in a standalone CorridorKey tool. Dynamic Link does not extend to external applications.
If your green screen plate originates in Premiere, the cleanest workflow is:
☼ Right-click the clip in Premiere > Replace with After Effects Composition ☼ In AE, export the plate as PNG sequence for CorridorKey processing ☼ Import the CorridorKey output back into AE ☼ Build the composite in AE ☼ The result flows back to Premiere via Dynamic Link automatically
Hybrid workflow: Keylight body, AI matte for hair
The strongest approach for difficult shots is often a hybrid: let Keylight handle the body (where it does fine) and use the AI-generated matte for the hair and fine edges (where Keylight struggles).
Here is how to combine two mattes in After Effects:
☼ Layer 1 (bottom): Your new background ☼ Layer 2: Foreground with CorridorKey matte applied (Track Matte or Set Matte). This is your AI key ☼ Layer 3: The same foreground footage with Keylight applied. This is your traditional key ☼ Layer 3 mask: Draw a mask around the body on Layer 3, excluding the hair and edges. Feather the mask generously (20-40px) so the transition between the Keylight key and the AI key is smooth
The body gets Keylight's clean, responsive key. The hair and edges get the AI matte's fine detail. The feathered mask blends the two so no seam is visible.
You can refine this further by pre-comping each keyed layer and using blending modes or additional mattes to control exactly where each key contributes.
When to use Keylight vs CorridorKey
A quick decision tree:
☼ Green screen is evenly lit, subject has clean edges, no transparency? Use Keylight. Done. ☼ Hair fringing that will not go away? Process that shot through CorridorKey. ☼ Motion blur breaking the matte on action frames? CorridorKey handles motion blur better. ☼ Translucent fabrics or glass in front of the screen? CorridorKey. Traditional keyers destroy these. ☼ Uneven green screen with hot spots and shadows? Try Keylight first with multiple Screen Colour picks. If it is still messy, send to CorridorKey. ☼ Tight deadline with dozens of shots? Use Keylight for everything passable and CorridorKey only for the 2-3 shots that truly need it. CorridorKey processing takes time. ☼ Subject on blue screen? Keylight handles blue screen natively. If you need AI keying on blue screen, EZ-CorridorKey v2.0 supports blue screen. Not all forks do.
The general principle: do not add processing time and complexity unless the result is visibly better. Keylight for the routine shots, CorridorKey for the hard ones.
Matching comp settings
Mismatched settings between your AE comp and your exported sequences will cause subtle problems: frame rate drift, subpixel scaling, or aspect ratio distortion. Before exporting plates for CorridorKey processing, confirm:
☼ Frame rate. Your export frame rate must match the comp frame rate exactly. If your comp is 23.976fps, export at 23.976fps. Not 24fps. ☼ Resolution. Export at full comp resolution. Do not downscale for speed unless you are running a test batch. ☼ Pixel aspect ratio. If your footage uses non-square pixels (anamorphic, DV, HDV), export with the same PAR. CorridorKey tools assume square pixels, so you may need to interpret footage correctly on reimport. ☼ Color space. If you are working in a linear or ACES color space in AE, export in that same space. Applying a color transform during export and another on import introduces unnecessary rounding.
FAQ
Can I use CorridorKey directly inside After Effects?
It depends on the implementation. Baskl.ai and Blace.ai have built plugins that apply neural unmixing as an AE effect. With these, you stay inside AE. Standalone tools like EZ-CorridorKey require you to export frames, process them externally, and reimport. The plugin approach is more convenient. The standalone approach gives you more control over the processing and does not tie up AE while frames are being processed.
Does CorridorKey work with blue screen footage?
The original CorridorKey was designed for green screen only. Some forks have added blue screen support. EZ-CorridorKey added green and blue screen keying in v2.0. If you shoot on blue screen, check that the specific tool you plan to use supports it before building your workflow around it.
How long does CorridorKey processing take per frame?
Processing time depends on resolution, GPU power, and which fork you are using. As a rough guide on a mid-range GPU (RTX 4070, 12GB VRAM): 1080p frames process in 2-4 seconds each, 4K frames in 8-15 seconds each. A 10-second shot at 24fps (240 frames) at 1080p takes roughly 8-16 minutes. This is not real-time. Plan your pipeline accordingly.
Can I batch process multiple shots?
Yes. Most standalone GUI tools support batch queuing. EZ-CorridorKey includes batch processing for handling multiple shots in sequence. You can queue up all your problem shots, start the batch, and work on other parts of your project while it runs. Some editors run the batch overnight and composite the results the next morning.
CorridorKey and EZ-CorridorKey are developed by Ed Zisk at EZSCAPE, creator of DITHERON, CRTified, and Cucolori. Learn more about how CorridorKey works or explore AI keying vs Keylight.