Skip to main content

disposeVideoMattingModel()v4.0.523

Releases the memory used by initialized video matting models. Persistent browser-cached model files are not deleted.

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

Options

model?

Only dispose this model. Default: all loaded video matting models.

If the model is in use, disposal waits until active separations using it have finished.

Return value

A Promise<void> that resolves after the selected models have been disposed.

Compatibility

BrowsersEnvironments
Chrome
Firefox
Safari

See also