Ovi: Twin Backbone Cross-Modal Fusion for Audio-Video Generation
Chetwin低 * 1 , 王为民 * † 1 , 卡尔德·卡蒂尔 2
* 平等贡献, † 项目负责人
1 角色AI, 2 耶鲁大学
______________________________________________________________________
🎥 视频演示
🆕 Ovi 1.1 10秒演示
Ovi 1.1 – 10-second temporally consistent video generation (960 × 960 resolution)
🎬 原始5秒演示
______________________________________________________________________
🆕 Ovi 1.1更新(2025年11月10日)
- 主要特点: 启用 *时间一致的10秒视频生成* 在 960×960分辨率
- 培训改进:
- 在960×960分辨率的视频上接受过原生培训 - 数据集包括 视频数量增加100% 为了更大的多样性 -
- 提示格式更新:
- 音频描述现在应该写成
Audio: ...而不是使用
... 🌟 主要特点
Ovi是一个类似veo-3的, 视频+音频生成模型 其同时从文本或文本+图像输入生成视频和音频内容。
- 🎬 视频+音频生成:同时生成同步的视频和音频内容
- 🎵 高品质音频分支:我们使用高质量的内部音频数据集从头开始设计和预训练了5B音频分支
- 📝 灵活输入:支持纯文本或文本+图像调节
- ⏱️ 10秒(或5秒)视频:以24 FPS、960x960p分辨率、各种宽高比(9:16、16:9、1:1等)生成10秒或5秒的视频
- 🎬 立即在wavespeed.ai上创建视频: https://wavespeed.ai/models/character-ai/ovi/image-to-video & https://wavespeed.ai/models/character-ai/ovi/text-to-video
- 🎬 立即在HuggingFace上创建视频: https://huggingface.co/spaces/akhaliq/Ovi
🎯 10秒示例
Click the ⛶ button on any video to view full screen.
🎯 5秒示例
Click the ⛶ button on any video to view full screen.
______________________________________________________________________
📋 事项清单
- \[x\] 发布研究论文和 演示网站
- \[x\] 11B型号检查点
- \[x\] 推理代码
- \[x\] 文本或文本+图像作为输入 - \[x\] Gradio应用程序代码 - \[x\] 支持或不支持序列并行的多GPU推理 - \[x\] fp8权重和内存效率的提高(归功于 @rkfg) - \[x\] qint8量化得益于 @暴食-10 - \[\]提高序列并行实现的效率 - \[\]使用FSDP实现分片推理
- \[x\] 视频创建示例提示和格式
- \[x\] 使用更高分辨率的数据对模型进行微调,并使用RL提高性能。
- \[x\] 更长的视频生成时间(10秒)
- \[\]参考语音条件
- \[\]用于更快推理的精简模型
- \[\]培训脚本
______________________________________________________________________
🎨 一种简单的创建方法
我们提供示例提示以帮助您开始使用Ovi:
- 文本转音频视频(T2AV)10秒:
example_prompts/gpt_examples_t2v.csv - 图像到音频视频(I2AV)10秒:
example_prompts/gpt_examples_i2v.csv - 文本转音频视频(T2AV):
example_prompts/gpt_examples_t2v.csv - 图像转音频视频(I2AV):
example_prompts/gpt_examples_i2v.csv
📝 提示格式
我们的提示使用特殊标签来控制语音和音频:
- 演讲:
Your speech content here-这些标签中包含的文本将被转换为语音 - 音频描述:
Audio: YOUR AUDIO DESCRIPTION-描述视频中存在的音频或声音效果 在提示结束时!
______________________________________________________________________
📦 安装
分步安装
# Clone the repository
git clone https://github.com/character-ai/Ovi.git
cd Ovi
# Create and activate virtual environment
virtualenv ovi-env
source ovi-env/bin/activate
# Install PyTorch first
pip install torch==2.6.0 torchvision torchaudio
# Install other dependencies
pip install -r requirements.txt
# Install Flash Attention
pip install flash_attn --no-build-isolation替代闪光灯注意安装(可选)
如果上述flash_attn安装失败,您可以尝试flash Attention 3方法:
git clone https://github.com/Dao-AILab/flash-attention.git
cd flash-attention/hopper
python setup.py install
cd ../.. # Return to Ovi directory下载重量
下载我们的主要Ovi检查点,以及来自Wan的T5和vae解码器,以及来自MMAudio的音频vae
# Default is downloaded to ./ckpts, and the inference yaml is set to ./ckpts so no change required
# Default installs all versions of Ovi models, 720x720_5s, 960x960_5s, 960x960_10s
python3 download_weights.py
# For qint8 also ues python3 download_weights.py
OR
# Optional can specific --output-dir to download to a specific directory
# but if a custom directory is used, the inference yaml has to be updated with the custom directory
python3 download_weights.py --output-dir
# Optional can specific --models to download selective versions of Ovi instead of all of them
# but if a custom directory is used, the inference yaml has to be updated with the custom directory
python3 download_weights.py --models 960x960_10s # ["720x720_5s", "960x960_5s", "960x960_10s"]
# Additionally, if you only have ~ 24Gb of GPU vram, please download the fp8 quantized version of the model, and follow the following instructions in sections below to run with fp8
wget -O "./ckpts/Ovi/model_fp8_e4m3fn.safetensors" "https://huggingface.co/rkfg/Ovi-fp8_quantized/resolve/main/model_fp8_e4m3fn.safetensors"🚀 运行示例
⚙️ 配置Ovi
Ovi的行为和输出可以通过修改来定制 ovi/配置/推断/推断 配置文件。 以下参数控制生成质量、视频分辨率以及文本、图像和音频输入的平衡方式:
# Output and Model Configuration
model_name: "960x960_10s" # ["720x720_5s", "960x960_5s", "960x960_10s"]
output_dir: "/path/to/save/your/videos" # Directory to save generated videos
ckpt_dir: "/path/to/your/ckpts/dir" # Path to model checkpoints
# Generation Quality Settings
sample_steps: 50 # Number of denoising steps. Lower (30-40) = faster generation
solver_name: "unipc" # Sampling algorithm for denoising process
shift: 5.0 # Timestep shift factor for sampling scheduler
seed: 100 # Random seed for reproducible results
# Guidance Strength Control
audio_guidance_scale: 3.0 # Strength of audio conditioning. Higher = better audio-text sync
video_guidance_scale: 4.0 # Strength of video conditioning. Higher = better video-text adherence
slg_layer: 11 # Layer for applying SLG (Skip Layer Guidance) technique - feel free to try different layers!
# Multi-GPU and Performance
sp_size: 1 # Sequence parallelism size. Set equal to number of GPUs used
cpu_offload: False # CPU offload, will largely reduce peak GPU VRAM but increase end to end runtime by ~20 seconds
fp8: False # load fp8 version of model, will have quality degradation and will not have speed up in inference time as it still uses bf16 matmuls, but can be paired with cpu_offload=True, to run model with 24Gb of GPU vram
# Input Configuration
text_prompt: "/path/to/csv" or "your prompt here" # Text prompt OR path to CSV/TSV file with prompts
mode: ['i2v', 't2v', 't2i2v'] # Generate t2v, i2v or t2i2v; if t2i2v, it will use flux krea to generate starting image and then will follow with i2v
video_frame_height_width: [704, 1280] # Video dimensions [height, width] for T2V mode only
each_example_n_times: 1 # Number of times to generate each prompt
# Quality Control (Negative Prompts)
video_negative_prompt: "jitter, bad hands, blur, distortion" # Artifacts to avoid in video
audio_negative_prompt: "robotic, muffled, echo, distorted" # Artifacts to avoid in audio🎬 运行推理
单GPU (简单设置)
python3 inference.py --config-file ovi/configs/inference/inference_fusion.yaml*将其用于单GPU设置。这 text_prompt 可以是单个字符串或CSV文件的路径。*
多GPU (并行处理)
torchrun --nnodes 1 --nproc_per_node 8 inference.py --config-file ovi/configs/inference/inference_fusion.yaml*使用此功能在多个GPU上并行运行样本,以实现更快的处理速度。*
内存和性能要求
以下是不同配置的GPU内存要求。未来将优化序列并行实现。 所有端到端时间都是基于一个121帧、720x720的视频,使用50个去噪步骤计算的。运行我们模型的GPU vram最低要求是 32Gb,目前支持fp8参数,将峰值VRAM使用率降低到 24Gb 质量略有下降。
| 序列并行大小 | 启用FlashAttention-3 | CPU卸载 | 使用图像生成模型 | 需要峰值VRAM | 端到端时间 |
|---|---|---|---|---|---|
| 1 | 是 | 否 | 否 | ~80 GB | ~83秒 |
| 1 | 否 | 否 | 约80 GB | 约96秒 | |
| 1 | 是 | 是 | 否 | ~80 GB | ~105秒 |
| 1 | 否 | 是 | 否 | ~32 GB | ~118秒 |
| 1 | 是 | 是 | 是 | 约32 GB | 约140秒 |
| 4 | 是 | 否 | 否 | ~80 GB | ~55秒 |
| 8 | 是 | 否 | 否 | ~80 GB | ~40秒 |
格拉迪奥
我们提供了一个简单的脚本,用于在gradio UI中运行我们的模型。它使用 ckpt_dir 在 ovi/configs/inference/inference_fusion.yaml 初始化模型
python3 gradio_app.py
OR
# To enable cpu offload to save GPU VRAM, will slow down end to end inference by ~20 seconds
python3 gradio_app.py --cpu_offload
OR
# To enable an additional image generation model to generate first frames for I2V, cpu_offload is automatically enabled if image generation model is enabled
python3 gradio_app.py --use_image_gen
OR
# To run model with 24Gb GPU vram. No need to download additional models.
python3 gradio_app.py --cpu_offload --qint8
# To run model with 24Gb GPU vram
python3 gradio_app.py --cpu_offload --fp8
______________________________________________________________________
🙏 致谢
我们要感谢以下项目:
______________________________________________________________________
🤝 协作
我们欢迎各种类型的合作!无论您是否有反馈、想要贡献或有任何问题,请随时联系。
联系: 王为民 对于任何问题或反馈。
⭐ 引用
如果Ovi有帮助,请帮助⭐ 回购。
如果你发现这个项目对你的研究有用,请考虑引用我们的 纸张.
BibTeX
@misc{low2025ovitwinbackbonecrossmodal,
title={Ovi: Twin Backbone Cross-Modal Fusion for Audio-Video Generation},
author={Chetwin Low and Weimin Wang and Calder Katyal},
year={2025},
eprint={2510.01284},
archivePrefix={arXiv},
primaryClass={cs.MM},
url={https://arxiv.org/abs/2510.01284},
}