Flame PyBox integration for CorridorKey — a neural green screen keyer based on GreenFormer/Hiera.
Runs on macOS Apple Silicon (MLX) and Linux CUDA (Rocky Linux / Ubuntu). Platform is detected automatically.
| Platform | Hardware | Software |
|---|---|---|
| macOS | Apple Silicon (M1–M4) | Miniconda, Flame 2025+ |
| Linux | NVIDIA GPU (RTX/A-series, 16GB+ VRAM) | Miniconda, CUDA 12.x, Flame 2025+ |
Miniconda is required — the installer uses conda to manage Python environments.
- macOS:
brew install minicondaor https://docs.conda.io/en/latest/miniconda.html - Linux:
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && bash Miniconda3-latest-Linux-x86_64.sh
Linux note: Do not run ComfyUI or other GPU-heavy processes alongside Flame. The daemon uses CPU offload (model lives in system RAM, moves to GPU per-frame) but Flame itself holds significant VRAM. Use
Img Size: 1024if you have less than 24GB.
Clone anywhere you like:
git clone https://github.com/cnoellert/corridorkey-flame.git
cd corridorkey-flameThe installer writes to /opt/corridorkey/, which is owned by root. It uses sudo internally for the initial directory creation, then immediately transfers ownership to your user account so subsequent runs and file copies don't need sudo. You will be prompted for your password on first install.
bash install.shThe installer handles everything automatically:
- Detects platform (macOS → MLX env, Linux → CUDA env)
- Creates the conda environment (
corridorkey-mlxorcorridorkey-cuda) - Installs Python dependencies (auto-detects CUDA version on Linux)
- Creates
/opt/corridorkey/{models,pybox,reference}/ - Copies pybox and reference inference code into place
- Downloads model weights from GitHub Releases (~380MB)
If you already have weights locally, skip the download:
bash install.sh --weights /path/to/CorridorKey_v1.0.pthIn Flame Batch, add a PyBox node and point it at:
/opt/corridorkey/pybox/corridorkey_pybox.py
To start fresh on any machine:
sudo rm -rf /opt/corridorkey
cd /path/to/corridorkey-flame # wherever you cloned the repo
git pull
bash install.shThe clone can live anywhere —
/opt/corridorkeyis the install target, not the repo location.sudo rmis needed because even though your user owns the directory, some platforms require it to remove from/opt.
cd /path/to/corridorkey-flame # wherever you cloned the repo
git pull
bash install.shThe installer skips steps that are already complete (existing conda env, existing weights) and overwrites all code files in place. No sudo needed after the initial install since your user owns /opt/corridorkey.
Mac note: Inference code lives in
/opt/corridorkey/mlx/, not/opt/corridorkey/pybox/. The installer handles this correctly. If you ever need to copy a file manually, copy to/opt/corridorkey/mlx/on Mac and/opt/corridorkey/reference/on Linux.
| Pin | Description |
|---|---|
IN_PLATE |
RGB plate (EXR, scene-linear or sRGB) |
IN_MATTE |
Rough matte / holdout mask (EXR) |
OUT_FG |
Keyed foreground RGBA (EXR) |
OUT_ALPHA |
Alpha channel RGB (EXR) |
Model page
Weights— path to model weights fileQuantized— enable quantized inference (macOS only, reduces memory)Img Size— inference resolution:2048 (Full Quality)or1024 (Fast). Defaults to 1024 on Linux (Flame reserves most GPU VRAM) and 2048 on macOS (unified memory). 1024 is ~3x faster with minimal quality loss on clean commercial GS work. Changing this respawns the daemon (~10s reload).
Settings page
Add sRGB Gamma— enable if input is scene-linear (converts to sRGB before inference, back to linear after)Despill Strength— green spill suppression (0–1)Despeckle— minimum alpha island area to remove (0–2000 px²)
EnvironmentNameNotFound: corridorkey-mlx — Old pybox file installed. Run git pull && bash install.sh.
can't open file '/opt/corridorkey/pybox/corridorkey_daemon_cuda.py' — /opt/corridorkey/ was not created. Run bash install.sh from the repo directory.
CUDA out of memory — Switch Img Size to 1024 in the Model tab, or flush GPU memory with sudo fuser -k /dev/nvidia* and retry at 2048. Check for other GPU processes with nvidia-smi.
Daemon not starting — Check /tmp/corridorkey_daemon.log for the full error.
Frames not updating — Check /tmp/corridorkey_ready exists (daemon loaded). If not, the model is still loading — give it 30–60 seconds on first run.
Force daemon restart — Run:
pkill -f corridorkey_daemon_cuda # or corridorkey_daemon_mlx on Mac
rm -f /tmp/corridorkey_params.json.* /tmp/corridorkey_readyThen trigger a frame in Flame.