MCPcopy Index your code
hub / github.com/meituan-longcat/LongCat-Video

github.com/meituan-longcat/LongCat-Video @main

repository ↗ · DeepWiki ↗ · + Follow
411 symbols 1,378 edges 34 files 93 documented · 23%
README

LongCat-Video

LongCat-Video


LongCat-Video

LongCat-Video-Avatar 1.5

placeholder

Model Introduction

We introduce LongCat-Video, a foundational video generation model with 13.6B parameters, delivering strong performance across Text-to-Video, Image-to-Video, and Video-Continuation generation tasks. It particularly excels in efficient and high-quality long video generation, representing our first step toward world models.

Key Features

  • 🌟 Unified architecture for multiple tasks: LongCat-Video unifies Text-to-Video, Image-to-Video, and Video-Continuation tasks within a single video generation framework. It natively supports all these tasks with a single model and consistently delivers strong performance across each individual task.
  • 🌟 Long video generation: LongCat-Video is natively pretrained on Video-Continuation tasks, enabling it to produce minutes-long videos without color drifting or quality degradation.
  • 🌟 Efficient inference: LongCat-Video generates $720p$, $30fps$ videos within minutes by employing a coarse-to-fine generation strategy along both the temporal and spatial axes. Block Sparse Attention further enhances efficiency, particularly at high resolutions
  • 🌟 Strong performance with multi-reward RLHF: Powered by multi-reward Group Relative Policy Optimization (GRPO), comprehensive evaluations on both internal and public benchmarks demonstrate that LongCat-Video achieves performance comparable to leading open-source video generation models as well as the latest commercial solutions.

For more detail, please refer to the comprehensive LongCat-Video Technical Report.

🎥 Teaser Video

🔥 Latest News!!

  • May 21, 2026: 🚀 We release LongCat-Video-Avatar-1.5, an upgraded open-source framework for audio-driven human video generation. v1.5 replaces Wav2Vec2 with Whisper-Large for more accurate lip synchronization, achieves production-ready physical rationality and temporal stability with robust long-video generation, generalizes to stylized domains (anime, animals, complex real-world conditions), supports both single-stream and multi-stream audio inputs, and accelerates inference to 8 steps via step distillation. [ code | 🤗 weights | project page ]
  • Dec 16, 2025: 🚀 We are excited to announce the release of LongCat-Video-Avatar, a unified model that delivers expressive and highly dynamic audio-driven character animation, supporting native tasks including Audio-Text-to-Video, Audio-Text-Image-to-Video, and Video Continuation with seamless compatibility for both single-stream and multi-stream audio inputs. The release includes our Technical Report, inference code, 🤗 model weights, and project page.
  • Oct 25, 2025: 🚀 We've released LongCat-Video, a foundational video generation model. Tech report and models are available at LongCat-Video Technical Report and 🤗 Huggingface !

Quick Start

Installation

Clone the repo:

git clone --single-branch --branch main https://github.com/meituan-longcat/LongCat-Video
cd LongCat-Video

Install dependencies:

# create conda environment
conda create -n longcat-video python=3.10
conda activate longcat-video

# install torch (configure according to your CUDA version)
pip install torch==2.6.0+cu124 torchvision==0.21.0+cu124 torchaudio==2.6.0 --index-url https://download.pytorch.org/whl/cu124

# install flash-attn-2
pip install ninja 
pip install psutil 
pip install packaging 
pip install flash_attn==2.7.4.post1

# install other requirements
pip install -r requirements.txt

# install longcat-video-avatar requirements
conda install -c conda-forge librosa
conda install -c conda-forge ffmpeg
pip install -r requirements_avatar.txt

FlashAttention-2 is enabled in the model config by default; you can also change the model config ("./weights/LongCat-Video/dit/config.json") to use FlashAttention-3 or xformers once installed.

Model Download

Models Description Download Link
LongCat-Video foundational video generation 🤗 Huggingface
LongCat-Video-Avatar single- and multi-character audio-driven video generation (wav2vec2) 🤗 Huggingface
LongCat-Video-Avatar-1.5 upgraded avatar model with Whisper-large-v3 audio encoder, distillation-based fast inference 🤗 Huggingface

Download models using huggingface-cli:

pip install "huggingface_hub[cli]"
huggingface-cli download meituan-longcat/LongCat-Video --local-dir ./weights/LongCat-Video
huggingface-cli download meituan-longcat/LongCat-Video-Avatar --local-dir ./weights/LongCat-Video-Avatar
huggingface-cli download meituan-longcat/LongCat-Video-Avatar-1.5 --local-dir ./weights/LongCat-Video-Avatar-1.5

Run Text-to-Video

# Single-GPU inference
torchrun run_demo_text_to_video.py --checkpoint_dir=./weights/LongCat-Video --enable_compile

# Multi-GPU inference
torchrun --nproc_per_node=2 run_demo_text_to_video.py --context_parallel_size=2 --checkpoint_dir=./weights/LongCat-Video --enable_compile

Run Image-to-Video

# Single-GPU inference
torchrun run_demo_image_to_video.py --checkpoint_dir=./weights/LongCat-Video --enable_compile

# Multi-GPU inference
torchrun --nproc_per_node=2 run_demo_image_to_video.py --context_parallel_size=2 --checkpoint_dir=./weights/LongCat-Video --enable_compile

Run Video-Continuation

# Single-GPU inference
torchrun run_demo_video_continuation.py --checkpoint_dir=./weights/LongCat-Video --enable_compile

# Multi-GPU inference
torchrun --nproc_per_node=2 run_demo_video_continuation.py --context_parallel_size=2 --checkpoint_dir=./weights/LongCat-Video --enable_compile

Run Long-Video Generation

# Single-GPU inference
torchrun run_demo_long_video.py --checkpoint_dir=./weights/LongCat-Video --enable_compile

# Multi-GPU inference
torchrun --nproc_per_node=2 run_demo_long_video.py --context_parallel_size=2 --checkpoint_dir=./weights/LongCat-Video --enable_compile

Run Interactive Video Generation

# Single-GPU inference
torchrun run_demo_interactive_video.py --checkpoint_dir=./weights/LongCat-Video --enable_compile

# Multi-GPU inference
torchrun --nproc_per_node=2 run_demo_interactive_video.py --context_parallel_size=2 --checkpoint_dir=./weights/LongCat-Video --enable_compile

Run LongCat-Video-Avatar

💡 User tips for 1.5

  • Lip synchronization accuracy: Audio CFG works optimally between 3–5. Increase the audio CFG value for better synchronization.
  • Prompt Enhancement: Longer, more descriptive prompts yield better consistency and naturalness than short ones. We recommend including rich details such as character appearance, actions, and scene context (e.g., "A young woman with long black hair is speaking and smiling, wearing a white blouse, sitting in a bright café") for best results.
  • Mitigate repeated actions: Setting the reference image index(--ref_img_index, default to 10) between 0 and 24 ensures better consistency; setting it to 30 helps reduce repeated actions. Additionally, increasing the mask frame range (--mask_frame_range, default to 3) can further help mitigate repeated actions, but excessively large values may introduce artifacts.
  • Super resolution: Our model is compatible with both 480P and 720P, which can be controlled via --resolution.
  • Dual-Audio Modes: Merge mode (set audio_type to para) requires two audio clips of equal length, and the resulting audio is obtained by summing the two clips; Concatenation mode (set audio_type to add) does not require equal-length inputs, and the resulting audio is formed by sequentially concatenating the two clips with silence padding for any gaps, where by default person1 speaks first and person2 speaks afterward.
  • Model versions: --model_type avatar-v1.0 uses wav2vec2 audio encoder (default); --model_type avatar-v1.5 uses Whisper-large-v3 audio encoder for better lip sync quality.
  • Distillation mode: Add --use_distill to enable distillation sampling (fewer steps, faster inference). This is required when using --model_type avatar-v1.5.
  • INT8 quantization: Add --use_int8 to load the INT8 quantized DiT model for reduced VRAM usage. Only supported with --model_type avatar-v1.5.

💡 User tips for 1.0

  • Lip synchronization accuracy:​​ Audio CFG works optimally between 3–5. Increase the audio CFG value for better synchronization.
  • Prompt Enhancement: Include clear verbal-action cues (e.g., talking, speaking) in the prompt to achieve more natural lip movements.
  • Mitigate repeated actions: Setting the reference image index(--ref_img_index, default to 10) between 0 and 24 ensures better consistency, while selecting other ranges (e.g., -10 or 30) helps reduce repeated actions. Additionally, increasing the mask frame range (--mask_frame_range, default to 3) can further help mitigate repeated actions, but excessively large values may introduce artifacts.
  • Super resolution: Our model is compatible with both 480P and 720P, which can be controlled via --resolution.
  • Dual-Audio Modes: Merge mode (set audio_type to para) requires two audio clips of equal length, and the resulting audio is obtained by summing the two clips; Concatenation mode (set audio_type to add) does not require equal-length inputs, and the resulting audio is formed by sequentially concatenating the two clips with silence padding for any gaps, where by default person1 speaks first and person2 speaks afterward.

LongCat-Video-Avatar-1.5

  • Single-Audio-to-Video Generation ```shell

Audio-Text-to-Video

torchrun --nproc_per_node=2 run_demo_avatar_single_audio_to_video.py --context_parallel_size=2 --checkpoint_dir=./weights/LongCat-Video-Avatar-1.5 --stage_1=at2v --input_json=assets/avatar/single_example_1.json --use_distill --model_type avatar-v1.5 --use_int8

Audio-Image-to-Video

torchrun --nproc_per_node=2 run_demo_avatar_single_audio_to_video.py --context_parallel_size=2 --checkpoint_dir=./weights/LongCat-Video-Avatar-1.5 --stage_1=ai2v --input_json=assets/avatar/single_example_1.json --use_distill --model_type avatar-v1.5 --use_int8

Audio-Text-to-Video and Video-Continuation

torchrun --nproc_per_node=2 run_demo_avatar_single_audio_to_video.py --context_parallel_size=2 --checkpoint_dir=./weights/LongCat-Video-Avatar-1.5 --stage_1=at2v --input_json=assets/avatar/single_example_1.json --num_segments=5 --ref_img_index=10 --mask_frame_range=3 --use_distill --model_type avatar-v1.5 --use_int8

Audio-Image-to-Video and Video-Continuation

torchrun --nproc_per_node=2 run_demo_avatar_single_audio_to_video.py --context_parallel_size=2 --checkpoint_dir=./weights/LongCat-Video-Avatar-1.5 --stage_1=ai2v --input_json=assets/avatar/single_example_1.json --num_segments=5 --ref_img_index=10 --mask_frame_r

Core symbols most depended-on inside this repo

to
called by 249
longcat_video/pipeline_longcat_video.py
to
called by 31
longcat_video/pipeline_longcat_video_avatar.py
enable_loras
called by 16
longcat_video/modules/longcat_video_dit.py
disable_all_loras
called by 13
longcat_video/modules/longcat_video_dit.py
_process_attn
called by 13
longcat_video/modules/avatar/attention.py
load_lora
called by 12
longcat_video/modules/longcat_video_dit.py
decode
called by 10
longcat_video/modules/autoencoder_kl_wan.py
step
called by 9
longcat_video/modules/scheduling_flow_match_euler_discrete.py

Shape

Method 227
Function 134
Class 50

Languages

Python100%

Modules by API surface

longcat_video/modules/autoencoder_kl_wan.py59 symbols
longcat_video/pipeline_longcat_video_avatar.py41 symbols
longcat_video/block_sparse_attention/bsa_interface.py39 symbols
longcat_video/pipeline_longcat_video.py32 symbols
longcat_video/modules/blocks.py24 symbols
longcat_video/context_parallel/context_parallel_util.py23 symbols
longcat_video/modules/scheduling_flow_match_euler_discrete.py22 symbols
longcat_video/modules/longcat_video_dit.py15 symbols
longcat_video/modules/avatar/longcat_video_dit_avatar.py15 symbols
longcat_video/modules/lora_utils.py13 symbols
longcat_video/audio_process/wav2vec2.py12 symbols
longcat_video/modules/avatar/rope_3d.py11 symbols

Dependencies from manifests, versioned

audio-separator0.30.2 · 1×
av12.0.0 · 1×
cffi2.0.0 · 1×
chardet5.2.0 · 1×
diffusers0.35.1 · 1×
einops0.8.0 · 1×
flash-attn2.7.4.post1 · 1×
ftfy6.2.0 · 1×
imageio2.37.0 · 1×
imageio-ffmpeg0.6.0 · 1×
librosa0.11.0 · 1×
libsndfile10.0.1 · 1×

For agents

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

⬇ download graph artifact