Skip to main content

isVideoMattingModelCached()v4.0.523

Checks whether all files hosted on remotion.media for a video matting model are present in the browser cache. The check does not download or initialize the model.

model-cache.ts
import {isVideoMattingModelCached} from '@remotion/video-matting'; const downloaded = await isVideoMattingModelCached({ model: 'modnet', });

Options

model

One of the names returned by getAvailableModels().

Return value

A Promise<boolean> resolving to true if every required model file is cached.

Compatibility

BrowsersEnvironments
Chrome
Firefox
Safari

See also