Nodes/ComfyUI-VideoMaMa/VideoMaMa Pipeline Loader
ComfyUI Node

VideoMaMa Pipeline Loader

This node's first run downloads a few GB before you do anything

By okdalto·Created 7 months ago·Updated 7 months ago· 59
VideoMaMa Pipeline Loader
    • VIDEOMAMA_PIPELINE
    base_model_pathcheckpoints/stabilityai/stable-video-diffusion-img2vid-xt
    unet_checkpoint_pathcheckpoints/VideoMaMa
    precisionfp16
    enable_model_cpu_offloadtrue
    vae_encode_chunk_size4
    attention_modeauto
    enable_vae_tilingfalse
    enable_vae_slicingtrue

    VideoMaMa is a ComfyUI wrapper around the KAIST CVLab research of the same name - mask-guided video matting that leans on a Stable Video Diffusion prior. It's two real steps: a heavy model load and the inference itself. This node is step one. It grabs a base SVD model plus a fine-tuned UNet checkpoint and bundles them into one reusable VIDEOMAMA_PIPELINE object that the VideoMaMa Sampler then consumes. Nothing gets generated here, no masks get made. What you get is a loaded, warmed-up pipeline sitting in VRAM, ready to be pointed at your frames.

    How it works

    Under the hood it loads four components from the base Stable Video Diffusion model via from_pretrained: a CLIP image feature extractor, the CLIP vision encoder that embeds your first frame, the temporal VAE that shuttles frames between pixel and latent space, and the fine-tuned UNet that does the actual matting work. That UNet is the point of the whole pack - the base SVD weights alone can't do this, the fine-tuned checkpoint from SammyLim/VideoMaMa on Hugging Face is what turns a generic video diffusion prior into a mask refiner.

    Both models auto-download on first use if they're not on disk, and they're large enough that your first queue of a workflow is really "go make coffee." The base model alone is stabilityai/stable-video-diffusion-img2vid-xt, a multi-GB download. You can pre-fetch either with huggingface-cli download <repo> if you'd rather not stall mid-workflow.

    The inputs that matter

    You mostly leave the defaults alone, but here's what's actually worth touching:

    • base_model_path and unet_checkpoint_path - where the SVD base and the VideoMaMa UNet live (defaults are inside the pack's checkpoints/ folder). Only change these if you pre-downloaded elsewhere.
    • precision - fp16 or bf16, default fp16. Fine on essentially all modern cards; bf16 is the pick on Ampere-and-newer hardware if you want the extra headroom.
    • enable_model_cpu_offload (default on) - keeps models on CPU and shuttles each one to the GPU only when it's needed. This is why the pack can run on 8 GB cards. Turn it off only if you have VRAM to burn and want the last bit of speed.
    • vae_encode_chunk_size (default 4) - how many frames get VAE-encoded at once. Lower = less memory, slower. You rarely touch this.
    • attention_mode (auto/xformers/sdpa/none) and the two VAE toggles - memory dials. auto tries xformers, falls back to PyTorch's SDPA, and keeps going if neither is present. Leave them be unless a load fails.

    The single output, VIDEOMAMA_PIPELINE, only fits into the VideoMaMa Sampler's pipeline input. That's a one-to-one relationship - load once, sample.

    Installing it

    cd /path/to/ComfyUI/custom_nodes/
    git clone https://github.com/okdalto/ComfyUI-VideoMaMa
    cd ComfyUI-VideoMaMa
    pip install -r requirements.txt
    

    Then restart ComfyUI and the nodes appear under the VideoMaMa category. Or just search "VideoMaMa" in ComfyUI Manager and click install - same result. It needs Python 3.10+, PyTorch 2.0+ with CUDA, and a GPU with enough VRAM; the requirements pull in diffusers, transformers, accelerate and huggingface_hub, which you almost certainly already have.

    Common issues

    • "Failed to load pipeline" - the pack's own catch-all. Check that both model paths exist, that the auto-download had enough disk and network, and that you've got VRAM to spare. The Hugging Face downloader is also the failure point if huggingface_hub isn't installed - the loader bails loudly rather than silently.
    • First run is a stall, not a hang - it's downloading gigabytes. Watch the console for the "Downloading ... from Hugging Face" lines.
    • OOM at load - turn enable_model_cpu_offload back on (it's on by default, so this means you turned it off), drop vae_encode_chunk_size, or drop to a smaller max_resolution downstream.

    A straight warning: this whole pack is a research wrapper with basically zero community signal so far - no reddit threads that actually discuss it as of mid-2026, no crowdsourced troubleshooting to lean on. If the loader errors and the above doesn't cover it, you're on your own with the source. The good news is the loader is the fiddly part; once the pipeline loads, the sampler is the easy bit.

    CategoryVideoMaMa

    Inputs (8)

    NameTypeDefaultDescription
    base_model_pathSTRINGcheckpoints/stabilityai/stable-video-diffusion-img2vid-xt
    unet_checkpoint_pathSTRINGcheckpoints/VideoMaMa
    precisionCOMBOfp162 options: fp16, bf16
    enable_model_cpu_offloadBOOLEANtrue
    vae_encode_chunk_sizeINT41–25
    attention_modeCOMBOauto4 options: auto, xformers, sdpa, none
    enable_vae_tilingBOOLEANfalse
    enable_vae_slicingBOOLEANtrue

    Outputs (1)

    NameTypeDescription
    VIDEOMAMA_PIPELINEVIDEOMAMA_PIPELINE