
wan-2-7
使用 RunComfy 上的 Wan 2.7(Wan-AI 旗艦動作模型)生成文字轉影片。說明 Wan 2.7 的優勢(多重參考條件、透過 `audio_url` 驅動的語音同步、更流暢的轉場、提示擴展)、時長/解析度/長寬比架構,以及何時改用 HappyHorse 1.0 / Seedance 2.0 / Kling / LTX 2。透過本機 RunComfy CLI 呼叫 `runcomfy run wan-ai/wan-2-7/text-to-video`。觸發詞為「wan」、「wan 2.7」、「wan-2-7」、「wan video」,或任何明確要求使用此模型生成影片的指令。
Generate text-to-video with Wan 2.7 (Wan-AI's flagship motion model) on RunComfy. Documents Wan 2.7's strengths (multi-reference conditioning, audio-driven lip-sync via `audio_url`, smoother transitions, prompt expansion), the duration / resolution / aspect-ratio schema, and when to route to HappyHorse 1.0 / Seedance 2.0 / Kling / LTX 2 instead. Calls `runcomfy run wan-ai/wan-2-7/text-to-video` through the local RunComfy CLI. Triggers on "wan", "wan 2.7", "wan-2-7", "wan video", or any explicit ask to generate video with this model.
Wan 2.7 — Pro Pack on RunComfy
runcomfy.com · Text-to-video · GitHub
Wan-AI 的 Wan 2.7 — 旗艦級影片模型,具備多重參考條件與音訊驅動的語音同步功能 — 託管於 RunComfy Model API。
npx skills add agentspace-so/runcomfy-skills --skill wan-2-7 -g
何時選擇此模型(與同系列其他模型比較)
| 您想要 | 使用 |
|---|---|
| 根據您提供的音軌進行語音同步影片 | Wan 2.7 (audio_url) |
| 多重參考精細動作控制 | Wan 2.7 |
| 流暢轉場、精確動作物理 | Wan 2.7 |
| 目前盲測排名第一的影片模型 | HappyHorse 1.0 |
| 多模態電影級效果,含圖片+影片+音訊參考及內建語音生成 | Seedance 2.0 Pro |
| 對現有素材進行電影級動作編輯 | Kling Video O1 |
| 超快速迭代 | LTX 2 |
如果使用者明確提到「Wan」/「Wan 2.7」/「wan-ai」/「阿里巴巴影片」,請直接路由至此模型。
前置需求
- RunComfy CLI —
npm i -g @runcomfy/cli - RunComfy 帳號 —
runcomfy login會開啟瀏覽器裝置碼流程。 - CI / 容器 — 設定
RUNCOMFY_TOKEN=<token>取代runcomfy login。
端點 + 輸入架構
wan-ai/wan-2-7/text-to-video
| 欄位 | 型別 | 必填 | 預設值 | 備註 |
|---|---|---|---|---|
prompt |
string | 是 | — | 最多約 5000 字元 / 約 1500 tokens。 |
audio_url |
string | 否 | — | WAV/MP3,3–30 秒,≤15MB。驅動語音同步。 省略 → 自動生成背景音樂。 |
aspect_ratio |
enum | 否 | 16:9 |
16:9、9:16、1:1、4:3、3:4。 |
resolution |
enum | 否 | 1080p |
720p 或 1080p。 |
duration |
enum | 否 | 5 |
2–15(整數秒)。 |
negative_prompt |
string | 否 | — | 最多 500 字元。具體要避免的問題。 |
enable_prompt_expansion |
bool | 否 | true | 自動改寫簡短提示。停用以獲得字面控制。 |
seed |
int | 否 | — | 0..2^31-1。重複使用以產生變體。 |
如何呼叫
預設(5 秒 1080p 16:9,提示擴展開啟):
runcomfy run wan-ai/wan-2-7/text-to-video \
--input '{"prompt": "<使用者提示>"}' \
--output-dir <絕對路徑>
音訊驅動語音同步(使用自己的音軌):
runcomfy run wan-ai/wan-2-7/text-to-video \
--input '{
"prompt": "Medium close-up of the spokesperson, warm key light, locked tripod, slight breathing motion.",
"audio_url": "https://.../voiceover.mp3",
"duration": 12,
"aspect_ratio": "9:16"
}' \
--output-dir <絕對路徑>
字面控制(無自動擴展):
runcomfy run wan-ai/wan-2-7/text-to-video \
--input '{
"prompt": "<完全按照您想要的內容,逐字>",
"enable_prompt_expansion": false,
"negative_prompt": "no subtitles, no flicker, no distorted hands"
}' \
--output-dir <絕對路徑>
提示技巧 — 實際有效的方法
用白話英文描述鏡頭與動作。 例如「Slow dolly in」、「locked tripod, low angle」、「handheld follow」、「crane move from above」。將鏡頭描述放在前面。
每個片段一個主要動作。 不要堆疊多個互相競爭的動作。選定一個節拍:例如「she turns, then smiles」,而不是「she turns AND smiles AND a bus passes AND...」。
使用 negative_prompt 指定具體問題。 好的範例:「no subtitles, no watermark, no flicker」。不好的範例(模糊):「no bad lighting」。
提示擴展預設開啟。 簡短提示會被模型自動改寫。對於簡潔/字面提示(例如品牌嚴格的廣告文案),請使用 enable_prompt_expansion: false 停用。
音訊規格很重要。 audio_url 必須是 3–30 秒、≤15MB、WAV/MP3 格式。超出範圍的檔案會被拒絕。音訊長度應與片段時長匹配。
迭代種子。 當您希望相同提示的不同變體產生一致的輸出時,請重複使用相同的種子。若要獲得真正的多樣性,請變更種子。
反模式:
- 靜態畫面描述 → 動作會模糊不清。
- 模糊的負面提示(如「no bad colors」)→ 被忽略。
- 音訊超出 3–30 秒 / 15MB / WAV-MP3 規格 → 被拒絕。
- 提示超過 5000 字元 / 1500 tokens → 輸出品質下降。
適用場景
| 使用案例 | 為何選擇 Wan 2.7 |
|---|---|
| 自訂配音的語音同步廣告 | audio_url 接受您的音軌 |
| 多語言配音變體 | 相同提示,不同語言的 audio_url |
| 多重參考動作控制 | 最多 5 個參考媒體(圖片/影片/語音) |
| 流暢轉場 + 動作物理 | 強大的物理感知動作先驗 |
| 負面提示的乾淨輸出 | 針對性問題排除 |
範例提示(經驗證可產生強烈效果)
頁面範例(產品展示):
Cinematic medium shot of a product on a marble surface, soft studio
lighting, slow subtle camera push-in, shallow depth of field, premium
commercial look, crisp 1080p detail
語音同步發言人(搭配 audio_url):
Medium close-up of a confident spokesperson in a softly-lit recording
booth, leaning slightly toward the camera, locked tripod, shallow depth
of field, warm key light from camera-left.
垂直平台原生格式:
9:16 vertical short. A barista pulls a single espresso shot, steam
rising into morning sun, rich crema slowly forming. Close-up handheld,
shallow DOF, warm cafe ambience.
限制
- 時長上限 15 秒。 如需更長敘事,請多次呼叫拼接。
- 無原生 4K — 最高 1080p。
- 長寬比 — 僅限文件中的 5 種數值。
- 音訊規格 — 僅限 3–30 秒、≤15MB、WAV/MP3。
- 參考媒體上限 5 個(圖片 + 影片 + 語音合計)。
- 如需內建語音生成(無需獨立音軌),請使用 Seedance 2.0 Pro — Wan 接受音訊而非生成音訊。
退出碼
| 代碼 | 意義 |
|---|---|
| 0 | 成功 |
| 64 | CLI 參數錯誤 |
| 65 | 輸入 JSON 錯誤 / 架構不符 |
| 69 | 上游 5xx 錯誤 |
| 75 | 可重試:逾時 / 429 |
| 77 | 未登入或 token 被拒絕 |
完整參考:docs.runcomfy.com/cli/troubleshooting。
運作方式
此技能會以符合架構的 JSON 主體呼叫 runcomfy run wan-ai/wan-2-7/text-to-video。CLI 會 POST 到 https://model-api.runcomfy.net/v1/models/wan-ai/wan-2-7/text-to-video,輪詢請求、取得結果,並將任何 .runcomfy.net/.runcomfy.com URL 下載到 --output-dir。按下 Ctrl-C 會在結束前取消遠端請求。
安全性與隱私
- Token 儲存:
runcomfy login將 API token 寫入~/.config/runcomfy/token.json,權限設為 0600(僅擁有者可讀寫)。在 CI/容器中設定RUNCOMFY_TOKEN環境變數可完全繞過檔案。 - 輸入邊界:使用者提示透過
--input以 JSON 字串傳遞給 CLI。CLI 不會對提示進行 shell 擴展;它會直接將 JSON 主體透過 HTTPS 傳送給 Model API。提示內容不會產生 shell 注入風險。 - 第三方內容:您傳入的圖片/遮罩/影片 URL 是由 RunComfy 模型伺服器擷取,而非您本機的 CLI。請將外部 URL 視為不受信任;基於圖片的提示注入是任何圖片/影片編輯模型的已知風險。
- 對外端點:僅限
model-api.runcomfy.net(請求提交)和*.runcomfy.net/*.runcomfy.com(生成輸出的下載白名單)。無遙測、無回呼。 - 生成檔案大小上限:CLI 會中止任何超過 2 GiB 的單一下載,以防止惡意或失控的模型輸出導致磁碟空間耗盡。





