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 or Node.js filesystem 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​

BrowsersServersEnvironments
Chrome
Firefox
Safari
Node.js
Bun
Serverless Functions

See also​