🚀 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的權重。