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.tsimport {isVideoMattingModelCached } from '@remotion/video-matting'; constdownloaded = awaitisVideoMattingModelCached ({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
| Browsers | Servers | Environments | |||||||
|---|---|---|---|---|---|---|---|---|---|
Chrome | Firefox | Safari | Node.js | Bun | Serverless Functions | ||||