Skip to main content

removeVideoMattingModel()v4.0.523

Removes a video matting model from memory and the persistent model cache.

If the model is still loading or separating a video, removal waits for the operation to finish.

remove-model.ts
import {removeVideoMattingModel} from '@remotion/video-matting'; await removeVideoMattingModel({model: 'modnet'});

Options​

model​

One of the names returned by getAvailableModels().

Compatibility​

BrowsersServersEnvironments
Chrome
Firefox
Safari
Node.js
Bun
Serverless Functions

See also​