🚀 MoviiGen 1.1
MoviiGen 1.1是一款前沿的视频生成模型,在电影美学和视觉质量方面表现卓越。它基于Wan2.1进行微调,经专业人士评估,在多个关键电影维度展现出出色性能。
✨ 主要特性
卓越的电影美学 :MoviiGen 1.1在氛围营造、镜头运动和物体细节保留三个关键维度上超越竞争对手,是专业电影应用的首选。
视觉连贯性与质量 :MoviiGen 1.1在清晰度(提升14.6%)和真实感(提升4.3%)方面表现出色,适用于高保真场景,如真实场景转换和人像细节处理。Wan2.1在流畅度和整体视觉和谐方面表现突出,更适合强调构图、连贯性和艺术风格的任务。两款模型总体得分相近,用户可根据需求选择MoviiGen 1.1以追求清晰度和真实感,或选择Wan2.1以追求风格和结构一致性。
全面的视觉能力 :MoviiGen 1.1在复杂视觉场景中表现稳定,确保主体和场景的一致呈现,同时保持高质量的动态效果。
高质量输出 :该模型生成的视频具有出色的清晰度和细节,支持720P和1080P分辨率,并在整个序列中保持一致的视觉质量。
专业级成果 :MoviiGen 1.1特别适用于对电影质量、视觉连贯性和美学卓越性要求极高的应用,与其他模型相比,整体质量更优。
📦 安装指南
克隆仓库
git clone https://github.com/ZulutionAI/MoviiGen1.1.git
cd MoviiGen1.1
安装依赖
# 确保torch >= 2.4.0
pip install -r requirements.txt
安装FastVideo
根据 FastVideo 的说明进行安装。
模型下载
T2V - 14B 模型:Huggingface
MoviiGen1.1模型支持720P和1080P。为获得更好的电影质量,建议使用1080P和21:9的宽高比(1920 * 832)。
使用huggingface - cli下载模型:
pip install "huggingface_hub[cli]"
huggingface-cli download ZuluVision/MoviiGen1.1 --local-dir ./MoviiGen1.1
💻 使用示例
基础用法
无提示扩展的推理:
PYTHONPATH=. python scripts/inference/generate.py --ckpt_dir ./MoviiGen1.1 --prompt "Inside a smoky, atmospheric private eye office bathed in dramatic film noir lighting, sharp shadows from slatted blinds cut across a cluttered desk and worn surroundings, evoking the classic style by 1940s film. A world-weary detective is sitting behind the desk. He is smoking a cigarette, slowly bringing it to his lips, inhaling, and exhaling a plume of smoke that drifts in the harsh, directional light. The scene is rendered in stark black and white, creating a high-contrast, cinematic mood. The camera holds a static medium shot focused on the detective, emphasizing the gritty texture and oppressive atmosphere."
高级用法
有提示扩展的推理:
我们为MoviiGen1.1提供了一个提示扩展模型,它是基于我们的内部数据对Qwen2.5 - 7B - Instruct模型进行微调得到的。该模型可在 Huggingface 上获取。
PYTHONPATH=. python scripts/inference/generate.py --ckpt_dir ./MoviiGen1.1 --prompt "A beautiful woman in a red dress is walking on the street." --use_prompt_extend --prompt_extend_model ZuluVision/MoviiGen1.1_Prompt_Rewriter
提示技巧
提示长度 :提示长度应在100 - 200左右。
提示内容 :提示应包含场景描述 、主要主体 、事件 、美学描述 和镜头运动 。
示例 :
场景描述:一个烟雾弥漫、充满氛围的私家侦探办公室,沐浴在戏剧性的黑色电影灯光下,百叶窗的尖锐阴影穿过杂乱的桌子和破旧的环境,唤起了20世纪40年代电影的经典风格。
主要主体:一位疲惫的侦探坐在桌子后面。
事件:他正在抽烟,慢慢地把烟送到嘴边,吸气,然后呼出一缕烟雾,在强烈的定向光中飘荡。
美学描述:场景以鲜明的黑白呈现,营造出高对比度的电影氛围。
镜头运动:相机保持静态中景,聚焦在侦探身上,强调粗糙的质感和压抑的氛围。
最终提示:
一个烟雾弥漫、充满氛围的私家侦探办公室,沐浴在戏剧性的黑色电影灯光下,百叶窗的尖锐阴影穿过杂乱的桌子和破旧的环境,唤起了20世纪40年代电影的经典风格。一位疲惫的侦探坐在桌子后面。他正在抽烟,慢慢地把烟送到嘴边,吸气,然后呼出一缕烟雾,在强烈的定向光中飘荡。场景以鲜明的黑白呈现,营造出高对比度的电影氛围。相机保持静态中景,聚焦在侦探身上,强调粗糙的质感和压抑的氛围。
📚 详细文档
训练框架
我们的训练框架基于 FastVideo 构建,并自定义实现了序列并行以优化内存使用和训练效率。序列并行方法允许我们将计算负载分布到多个GPU上,从而实现大规模视频生成模型的高效训练。
关键特性
序列并行与环形注意力 :我们的自定义实现将时间维度划分到多个GPU上,在保持模型质量的同时降低了每个设备的内存需求。
高效数据加载 :优化的数据管道用于处理高分辨率视频帧(潜在缓存和文本嵌入缓存)。
多分辨率训练桶 :支持多分辨率训练。
混合精度训练 :支持BF16/FP16训练以加速计算。
分布式训练 :无缝支持多节点、多GPU训练。
数据预处理
我们将视频和相应的文本提示缓存为潜在变量和文本嵌入,以优化训练过程。这个预处理步骤通过减少训练阶段的计算开销,显著提高了训练效率。你需要提供一个merge.txt 文件来指定数据集路径。数据集应该是一个类似于training_data.json 的JSON文件。最后,你将得到包含潜在变量和文本嵌入路径的video_caption.json 。
bash scripts/data_preprocess/preprocess.sh
示例数据格式
merge.txt
relative_path_to_json_dir, training_data.json
training_data.json
[
{
"cap" : "your prompt" ,
"path" : "path/to/your/video.mp4" ,
"resolution" : {
"width" : 3840 ,
"height" : 2160
} ,
"fps" : 23.976023976023978 ,
"duration" : 1.4180833333333331
} ,
...
]
输出JSON
video_caption.json
[
{
"latent_path" : "path/to/your/latent.pt" ,
"prompt_embed_path" : "path/to/your/prompt_embed.pt" ,
"length" : 12
} ,
...
]
训练
bash scripts/train/finetune.sh
进行多节点训练时,你需要手动设置节点数和每个节点的进程数。 我们提供了一个多节点训练的示例脚本。
bash scripts/train/finetune_multi_node.sh
🔧 技术细节
手动评估
📄 许可证
本项目采用Apache - 2.0许可证。
🎥 视频演示
Your browser does not support the video tag.
Your browser does not support the video tag.
Your browser does not support the video tag.
Your browser does not support the video tag.
Your browser does not support the video tag.
Your browser does not support the video tag.
Your browser does not support the video tag.
Your browser does not support the video tag.
Your browser does not support the video tag.
Your browser does not support the video tag.
Your browser does not support the video tag.
Your browser does not support the video tag.
🆕 最新消息
2025年5月17日:我们发布了MoviiGen1.1的推理代码和训练代码 。
2025年5月12日:我们发布了MoviiGen1.1的权重。