5.3 KiB
MiniMax-Remover: Taming Bad Noise Helps Video Object Removal
Bojia Zi*,
Weixuan Peng*,
Xianbiao Qi†,
Jianan Wang, Shihao Zhao, Rong Xiao, Kam-Fai Wong
* Equal contribution. † Corresponding author.
🚀 Overview
MiniMax-Remover is a fast and effective video object remover based on minimax optimization. It operates in two stages: the first stage trains a remover using a simplified DiT architecture, while the second stage distills a robust remover with CFG removal and fewer inference steps.
📧 Contact
Feel free to send an email to 19210240030@fudan.edu.cn if you have any questions or suggestions.
MiniMax-Remover BMO - ComfyUI Integration Brendan@casterpollux.com if need assistance on comfy section
🎉 High-Quality Video Object Removal
This is the BMO implementation of MiniMax-Remover for ComfyUI that delivers natural, high-quality inpainting results. Based on the official MiniMax-Remover implementation with proper VAE normalization and dimension handling.
🔥 Key Features
- ✅ Proper VAE Normalization: Uses official
latents_meanandlatents_stdfrom VAE config - ✅ Optimized Scheduler: Properly configured UniPCMultistepScheduler for flow prediction
- ✅ Dimension Compatibility: Perfect VAE output vs transformer input alignment
- ✅ Official Parameters: Uses optimal defaults (12 steps, 6 iterations)
- ✅ Natural Results: Produces solid, realistic inpainting with clean edges
📥 Installation
Method 1: Automatic Setup (Recommended)
- Run the setup script:
python setup_comfyui_integration_bmo.py
- Follow the prompts to specify your ComfyUI path
- Restart ComfyUI completely
Method 2: Manual Installation
- Copy these files to your ComfyUI custom_nodes directory:
ComfyUI/custom_nodes/minimax-remover-bmo/
├── __init__.py
├── minimax_mask_node_bmo.py
├── pipeline_minimax_remover_bmo.py
└── transformer_minimax_remover.py
- Restart ComfyUI
🚀 Usage
In ComfyUI:
-
Add the node: Look for "MiniMax-Remover (BMO)" in the MiniMax-Remover category
-
Connect inputs:
images: Your video frames as IMAGE typemasks: Your binary masks as MASK type
-
Set parameters:
num_inference_steps: 12 (official default, good quality/speed balance)iterations: 6 (mask expansion iterations, official default)seed: Any number for reproducible resultsmodel_path: Path to your MiniMax models (default: "models/")
-
Run: The output will be clean, natural-looking inpainting!
Model Setup
Place your MiniMax-Remover models in this structure and paste the path into the comfy ui node:
ComfyUI/custom_nodes/minimax-remover-bmo/models
├── vae/
│ ├── config.json
│ └── diffusion_pytorch_model.safetensors
├── transformer/
│ ├── config.json
│ └── diffusion_pytorch_model.safetensors
└── scheduler/
└── scheduler_config.json
📊 Performance
- Processing Time: ~1-2 seconds for 5 frames at 288x528
- Memory Usage: Efficient with proper tensor management
- Quality: Natural, solid inpainting results
🐛 Troubleshooting
Poor quality results:
- Ensure you're using the BMO node (latest version)
- Try different seeds
- Adjust mask expansion (iterations parameter)
Memory issues:
- Use smaller input resolutions
- Enable model offloading in ComfyUI
📝 Example Workflow
- Load Video: Use VHS nodes to load your input video
- Create Masks: Use masking tools or load pre-made masks
- Process: Connect to "MiniMax-Remover (BMO)" node
- Output: Save or preview the cleaned video
🎯 Best Practices
- Resolution: Works best with resolutions divisible by 16
- Mask Quality: Clean, binary masks work best
- Iterations: 6-10 for most cases, higher for larger objects
- Steps: 12 is optimal, 8-20 range depending on quality needs