MCPcopy Index your code
hub / github.com/cvlab-kaist/VideoMaMa

github.com/cvlab-kaist/VideoMaMa @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
188 symbols 650 edges 20 files 78 documented · 41%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

VideoMaMa: Mask-Guided Video Matting via Generative Prior

Sangbeom Lim1 · Seoung Wug Oh2 · Jiahui Huang2 · Heeji Yoon3
Seungryong Kim3 · Joon-Young Lee2

1Korea University    2Adobe Research    3KAIST AI

CVPR 2026

Paper PDF Project Page

VideoMaMa is a mask-guided video matting framework that leverages a video generative prior. By utilizing this prior, it supports stable performance across diverse video domains with fine-grained matting quality.

<img style="width:100%" src="https://github.com/cvlab-kaist/VideoMaMa/raw/main/assets/teaser.jpg">

For more visual results, go checkout our project page

📰 News

VideoMaMa is an open-source project. If you find our work helpful, please consider giving this repository a ⭐.

🔥 TODO

  • [x] Release Demo & Model checkpoint. (Jan 19, 2026)
  • [x] Release ArXiv paper. (Jan 19, 2026)
  • [x] Release Training Code. (Mar 14, 2026)
  • [ ] Evaluation Code.
  • [ ] Release MA-V dataset.

⚙️ Setup

Please run

bash scripts/setup.sh

it will down load stable video diffusion weight, and setup virtual enviroment needed to run whole codes.
We use conda activate videomama.

This will download sam2 which is needed for training sam2-matte.

🎮 Demo

Please check demo readme.

🎯 Inference

Hugging Face Model Card

VideoMaMa model checkpoint — available on the Hugging Face Hub: SammyLim/VideoMaMa.

For inferencing video use this command.

python inference_onestep_folder.py \
--base_model_path "<stabilityai/stable-video-diffusion-img2vid-xt_path>" \
--unet_checkpoint_path "<videomama_checkpoint_path>" \
--image_root_path "/assets/example/image" \
--mask_root_path "assets/example/mask" \
--output_dir "assets/example" \
[--optional_arguments]

For example, If you have setup using above command, this example bash will work.

python inference_onestep_folder.py \
    --base_model_path "checkpoints/stable-video-diffusion-img2vid-xt" \
    --unet_checkpoint_path "checkpoints/VideoMaMa" \
    --image_root_path "/assets/example/image" \
    --mask_root_path "assets/example/mask" \
    --output_dir "assets/example" \
    --keep_aspect_ratio 

For more information about inference setting, please check inference readme.

🚂🚃🚃🚃🚃 Training

Generating training dataset

Please check Data pipeline README.

Model Training

Please check training README.

🎓 Citation

@article{lim2026videomama,
  title={VideoMaMa: Mask-Guided Video Matting via Generative Prior},
  author={Lim, Sangbeom and Oh, Seoung Wug and Huang, Jiahui and Yoon, Heeji and Kim, Seungryong and Lee, Joon-Young},
  journal={arXiv preprint arXiv:2601.14255},
  year={2026}
}

🙏 Acknowledgments

  • SAM2: Meta AI's Segment Anything 2
  • Stable Video Diffusion: Stability AI's video generation model
  • Gradio: For the amazing UI framework

📧 Contact

For questions or issues, please open an issue on our GitHub repository.

We welcome any feedback, questions, or opportunities for collaboration. If you are interested in using this model for industrial applications, or have specific questions about the architecture and training, please feel free to reach out.

📄 License

The code in this repository is released under the CC BY-NC 4.0 license, unless otherwise specified.

This repository builds on implementations and ideas from the Hugging Face ecosystem and the diffusion-e2e-ft project. Many thanks to the original authors and contributors for their open-source work.

The VideoMaMa model checkpoints (specifically VideoMama/unet/* and dino_projection_mlp.pth) are subject to the Stability AI Community License.

Core symbols most depended-on inside this repo

get_files_from_folder
called by 6
data_pipeline/generate_synthetic.py
get_files_from_folder
called by 5
dataloader/synthetic_on_the_fly.py
_filter2d
called by 4
train.py
_gaussian
called by 4
train.py
to_3_channel
called by 4
train.py
augment_by_resizing
called by 4
dataloader/augmentations.py
l1_loss
called by 4
src/matting_loss.py
sobel
called by 4
src/matting_loss.py

Shape

Method 93
Function 75
Class 20

Languages

Python100%

Modules by API surface

pipeline_svd_mask.py38 symbols
train.py26 symbols
src/unet_spatio_temporal_condition.py24 symbols
src/matting_loss.py18 symbols
dataloader/augmentations.py14 symbols
demo/app.py12 symbols
inference_onestep_folder.py11 symbols
dataloader/synthetic_on_the_fly.py7 symbols
dataloader/synthetic.py6 symbols
demo/tools/base_segmenter.py5 symbols
demo/sam2_wrapper_hf.py5 symbols
demo/sam2_wrapper.py5 symbols

For agents

$ claude mcp add VideoMaMa \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page