Koolook Matte — Loader
Load the VideoMaMa matting pipeline (and its big model downloads)
- KOOLOOK_MATTE_PIPELINE
Koolook Matte Loader is where the Matte workflow's heavy lifting gets set up. It loads a mask-guided one-step video matting pipeline built from two models: Stable Video Diffusion as the base (for its temporal VAE) and VideoMaMa, a fine-tuned SVD UNet that turns a video plus rough masks into a clean alpha matte. This is the node that downloads the weights, so it's also the node that eats your first-run time and disk.
VideoMaMa is the obscure one here. It's a CVPR 2026 method (mask-guided video matting via generative prior), and it's quiet enough that you won't find much community chatter about it - the Koolook pack's own pipeline is an independent implementation of the published method built on the standard diffusers API, not a wrapper around someone's repo. The model's premise: a single denoising step at timestep 1, with the video frame and the guide mask VAE-encoded alongside the noise, and the CLIP cross-attention zeroed because the fine-tune ignores it. Decode with SVD's temporal VAE, take the luminance, that's your alpha. One step, that's the whole trick - video matting fast enough to be practical.
The inputs that matter
- base_model_path - defaults to
checkpoints/stabilityai/stable-video-diffusion-img2vid-xt. The SVD base provides the VAE. If the path doesn't exist, the node tries to download it from Hugging Face (huggingface_hub) into that folder on first run. - unet_checkpoint_path - defaults to
checkpoints/VideoMaMa, the fine-tuned UNet. Same deal: missing →snapshot_downloadofSammyLim/VideoMaMa. - vae_encode_chunk_size - frames the VAE encodes/decodes at once. Leave at 1. The tooltip is blunt: raising it makes the VAE decode spike "proportionally bigger and is the usual cause of OOM at high resolution / 4K." Only touch it if you have VRAM to spare.
- precision - fp16 (default) or bf16. On a CPU-only machine it force-falls back to float32, with a log warning that a GPU is strongly recommended - SVD on CPU is a misery you can avoid.
- enable_model_cpu_offload - on by default, and worth keeping on: it streams model weights to CPU when idle, which is how this fits on consumer cards.
- attention_mode - auto/xformers/sdpa/none, for people who know which attention backend their build prefers.
autois the right answer for almost everyone. - enable_vae_slicing / enable_vae_tiling - memory knobs. Slicing defaults on, tiling defaults off. Turn tiling on only if you're drowning at high res.
Output is a single KOOLOOK_MATTE_PIPELINE that wires straight into the Sampler.
The license asterisk
The code is GPL-3.0, but the weights it downloads carry their own licenses - VideoMaMa is CC BY-NC 4.0 and SVD is under the Stability Community License. Non-commercial. The pack doesn't redistribute them, and the README says plainly the end user is responsible for compliance. If your project is commercial, this pipeline isn't for you.
Install
Part of ComfyUI-Koolook:
cd ComfyUI/custom_nodes
git clone https://github.com/malkuthro/ComfyUI-Koolook.git
or via Manager by Git URL https://github.com/malkuthro/ComfyUI-Koolook.git, then restart. The Matte group needs diffusers (the pack's forks pull it in) plus huggingface_hub for the runtime downloads. First run downloads two models - budget some time and disk. Install once, per the pack rule: two installs (Manager's custom_nodes/koolook/ plus a clone) load both and corrupt the workflow store on every boot.
Common issues
- First run is slow / huge - that's the SVD and VideoMaMa weights downloading. It's a one-time cost, not a bug.
- OOM on decode -
vae_encode_chunk_sizeis above 1. Back it to 1. - "diffusers isn't installed" - the Matte group is skipped if
diffuserscan't import; install it into the ComfyUI environment (usuallypython -m pip install diffusers huggingface_hubinside the venv that runs ComfyUI).
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| base_model_path | STRING | checkpoints/stabilityai/stable-video-diffusion-img2vid-xt | — |
| unet_checkpoint_path | STRING | checkpoints/VideoMaMa | — |
| precision | COMBO | fp16 | 2 options: fp16, bf16 |
| enable_model_cpu_offload | BOOLEAN | true | — |
| vae_encode_chunk_size | INT | 11–25 | Frames the VAE encodes/decodes at once. 1 = desktop (Sammie) default and lowest VRAM; raising it makes the VAE decode spike proportionally bigger and is the usual cause of OOM at high resolution / 4K. Leave at 1 unless you have VRAM to spare and want a small speedup. |
| attention_mode | COMBO | auto | 4 options: auto, xformers, sdpa, none |
| enable_vae_tiling | BOOLEAN | false | — |
| enable_vae_slicing | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| KOOLOOK_MATTE_PIPELINE | KOOLOOK_MATTE_PIPELINE | — |