disposeVideoMattingModel()v4.0.523
Releases the memory used by initialized video matting models. Persistent browser-cached model files are not deleted.
dispose.tsimport {disposeVideoMattingModel } from '@remotion/video-matting'; awaitdisposeVideoMattingModel ({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
| Browsers | Environments | |||||
|---|---|---|---|---|---|---|
Chrome | Firefox | Safari | ||||