Skip to main content

getAvailableModels()v4.0.523

Returns metadata for the models supported by separateVideoLayers().

models.ts
import {getAvailableModels} from '@remotion/video-matting'; const models = getAvailableModels(); console.log(models);
NamePurposeWebGPU download sizeStatus
modnetPeople25.9 MBDefault
ben2-baseGeneral foreground subjects219.1 MBExperimental and higher-resource

The modnet model is Apache-2.0 licensed.
The ben2-base model is the MIT-licensed BEN2 Base export.

Model hosting​

The modelId values identify the upstream Hugging Face models.

We noticed that hosting the models on R2 leads to faster downloading than through Hugging Face directly.
We mirrored the models to remotion.media, keeping them byte-identical.
We also notified Hugging Face and they are investigating the issue. We may migrate back to the official hosting in the future.

Return value​

Returns an array with the following properties:

name​

The model name accepted by APIs in this package.

modelId​

The upstream Hugging Face model identifier. This is provenance metadata, not the runtime download location.

purpose​

A short description of the subjects the model is intended to separate.

webGpuDownloadSize​

The total size in bytes of all runtime files downloaded for WebGPU.

Compatibility​

BrowsersEnvironments
Chrome
Firefox
Safari

See also​