ayushunleashed / minimax-remover

Remove any object from video - fast.

  • Public
  • 34 runs
  • L40S
  • GitHub
Iterate in playground

Input

*file
Preview

Input video file with objects to be removed

*file
Preview

Mask video file where white areas indicate objects to remove. See examples: https://replicate.com/ayushunleashed/minimax-remover/readme

integer
(minimum: -1)

Number of frames to process (-1 = same as original video)

Default: -1

integer
(minimum: -1)

Output video height (-1 = same as original video, auto-scaled to max 1920px if needed)

Default: -1

integer
(minimum: -1)

Output video width (-1 = same as original video, auto-scaled to max 1920px if needed)

Default: -1

integer
(minimum: -1)

Output video FPS (-1 = same as original video)

Default: -1

integer
(minimum: 1, maximum: 50)

Number of denoising steps (higher = better quality, slower. 6=fast, 8=balanced, 12=high quality)

Default: 6

integer
(minimum: 1, maximum: 20)

Mask expansion iterations for robust removal (higher = more thorough removal)

Default: 8

integer

Random seed for reproducible results (leave blank for random)

Output

Generated in

Run time and cost

This model runs on Nvidia L40S GPU hardware. We don't yet have enough runs of this model to provide performance information.

Readme

MiniMax-Remover is a fast and effective video object remover based on minimax optimization. This Cog wrapper provides a convenient API for running the model on Replicate with video and mask inputs.

You’ll need 2 things to run this model.

Requirements

  1. Original video you want to remove object from.
  2. Binary Masked video of object you want to remove.

Generate mask video using

  1. Get first frame of your original video using https://replicate.com/lucataco/frame-extractor
  2. First frame → https://replicate.com/meta/sam-2 → Multiple masked images
  3. Select mask of the subject(s) you want to remove.
  4. Masked image + Original Video → https://replicate.com/jd7h/xmem → Masked video.

License

This Cog wrapper follows the same license as the original MiniMax-Remover project. See the original repository for license details.

Citation

If you use this model, please cite the original MiniMax-Remover paper:

@article{minimax2024,
  title={MiniMax-Remover: Taming Bad Noise Helps Video Object Removal},
  author={Bojia Zi and Weixuan Peng and Xianbiao Qi and Jianan Wang and Shihao Zhao and Rong Xiao and Kam-Fai Wong},
  year={2024}
}