Wan萬相 2.2 14B 文生影片
使用Wan 2.2透過電影美學控制和動態運動產生從文字提示產生高品質影片。
工作流程內部
來源範本的唯讀預覽。請在 Cloud 中開啟,以探索節點並進行變更。
Loading the graph
Open full-size workflow preview從您的程式碼呼叫此模型
以下請求使用與 Playground 相同的已準備節點圖和設定。每次提交都可能啟動付費執行;若提交結果不明,請勿自動重試提交。
What you need
- Runs on
- Comfy Cloud
- 金鑰
- COMFY_API_KEY
需要付費 Cloud 方案與點數。
# Python 3.10+: pip install comfy-sdk==0.4.0
import os
from comfy_sdk import Comfy
api_key = os.environ.get("COMFY_API_KEY", "").strip()
if not api_key: raise RuntimeError("Set COMFY_API_KEY")
os.environ.setdefault("COMFY_BASE_URL", "https://cloud.comfy.org")
client = Comfy(api_key=api_key)
workflow = client.workflows.from_json({
"71": {
"class_type": "CLIPLoader",
"inputs": {
"clip_name": "umt5_xxl_fp8_e4m3fn_scaled.safetensors",
"device": "default",
"type": "wan"
},
"_meta": {
"title": "Load CLIP"
}
},
"72": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"71",
0
],
"text": "色调艳丽,过曝,静态,细节模糊不清,字幕,风格,作品,画作,画面,静止,整体发灰,最差质量,低质量,JPEG压缩残留,丑陋的,残缺的,多余的手指,画得不好的手部,画得不好的脸部,畸形的,毁容的,形态畸形的肢体,手指融合,静止不动的画面,杂乱的背景,三条腿,背景人很多,倒着走,裸露,NSFW"
},
"_meta": {
"title": "CLIP Text Encode (Negative Prompt)"
}
},
"73": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "wan_2.1_vae.safetensors"
},
"_meta": {
"title": "Load VAE"
}
},
"74": {
"class_type": "EmptyHunyuanLatentVideo",
"inputs": {
"batch_size": 1,
"height": 720,
"length": 81,
"width": 1280
},
"_meta": {
"title": "Empty Hunyuan Video 1.0 Latent"
}
},
"75": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "wan2.2_t2v_high_noise_14B_fp8_scaled.safetensors",
"weight_dtype": "default"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"76": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "wan2.2_t2v_low_noise_14B_fp8_scaled.safetensors",
"weight_dtype": "default"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"78": {
"class_type": "KSamplerAdvanced",
"inputs": {
"add_noise": "disable",
"cfg": 1,
"end_at_step": 4,
"latent_image": [
"81",
0
],
"model": [
"86",
0
],
"negative": [
"72",
0
],
"noise_seed": 0,
"positive": [
"89",
0
],
"return_with_leftover_noise": "disable",
"sampler_name": "euler",
"scheduler": "simple",
"start_at_step": 2,
"steps": 4
},
"_meta": {
"title": "KSampler (Advanced)"
}
},
"80": {
"class_type": "SaveVideo",
"inputs": {
"filename_prefix": "video/ComfyUI",
"format": "auto",
"format.codec": "auto",
"video": [
"88",
0
]
},
"_meta": {
"title": "Save Video"
}
},
"81": {
"class_type": "KSamplerAdvanced",
"inputs": {
"add_noise": "enable",
"cfg": 1,
"end_at_step": 2,
"latent_image": [
"74",
0
],
"model": [
"82",
0
],
"negative": [
"72",
0
],
"noise_seed": 392459563371087,
"positive": [
"89",
0
],
"return_with_leftover_noise": "enable",
"sampler_name": "euler",
"scheduler": "simple",
"start_at_step": 0,
"steps": 4
},
"_meta": {
"title": "KSampler (Advanced)"
}
},
"82": {
"class_type": "ModelSamplingSD3",
"inputs": {
"model": [
"83",
0
],
"shift": 5.000000000000001
},
"_meta": {
"title": "ModelSamplingSD3"
}
},
"83": {
"class_type": "LoraLoaderModelOnly",
"inputs": {
"lora_name": "wan2.2_t2v_lightx2v_4steps_lora_v1.1_high_noise.safetensors",
"model": [
"75",
0
],
"strength_model": 1.0000000000000002
},
"_meta": {
"title": "Load LoRA"
}
},
"85": {
"class_type": "LoraLoaderModelOnly",
"inputs": {
"lora_name": "wan2.2_t2v_lightx2v_4steps_lora_v1.1_low_noise.safetensors",
"model": [
"76",
0
],
"strength_model": 1.0000000000000002
},
"_meta": {
"title": "Load LoRA"
}
},
"86": {
"class_type": "ModelSamplingSD3",
"inputs": {
"model": [
"85",
0
],
"shift": 5.000000000000001
},
"_meta": {
"title": "ModelSamplingSD3"
}
},
"87": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"78",
0
],
"vae": [
"73",
0
]
},
"_meta": {
"title": "VAE Decode"
}
},
"88": {
"class_type": "CreateVideo",
"inputs": {
"bit_depth": "auto",
"codec": "none",
"color_space": "sRGB",
"fps": 16,
"images": [
"87",
0
]
},
"_meta": {
"title": "Create Video"
}
},
"89": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"71",
0
],
"text": "A low tracking shot skims just above the churning ocean, slowly pushing in toward the action over five seconds. Across the vast, stormy expanse beneath an overcast sky, two massive black-and-white orcas surge dynamically through the dark blue-gray water. In the center, the dominant orca breaches powerfully, its sleek body and tall dorsal fin arcing skyward before crashing downward, displacing a heavy explosion of white spray. Beside it, the secondary orca smoothly breaks the surface, rolling through the frothy crests as fine ocean mist drifts through the cool air. The rolling swell heaves continuously, sending turbulent ripples outward as both apex predators dive back beneath the foaming waves."
},
"_meta": {
"title": "CLIP Text Encode (Positive Prompt)"
}
}
})
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)
for output in job.get_outputs("80"):
output.to_file(output.name)試試範例
關於此工作流程
ComfyUI 的「Wan 2.2 14B Text to Video」工作流程是一套把文字提示詞轉成高品質、具電影感影片的工具。它使用擅長生成動態運動並可控制影片美術風格的 Wan2.2 模型,將文字描述轉換成具吸引力的影像內容。工作流程包含多個關鍵節點,例如 CLIPLoader 與 CLIPTextEncode 處理文字,VAELoader 操作 latent 空間,以及 UNETLoader 用於影像合成。
在技術結構上,工作流程分成多個群組以處理不同生成階段。「Step1 - Load models」初始化所需模型;「Step2 - Video size」設定輸出尺寸;「Wan2.2 T2V fp8_scaled」群組負責文字轉影片的核心流程,並透過 KSamplerAdvanced 等進階採樣節點運作。這種結構化設計讓你能更精準地控制品質與風格,適合想用簡單文字提示詞製作電影感影片內容的創作者。
問答
流程採用 Wan2.2 文字轉影片模型,並搭配 CLIPLoader、VAELoader、UNETLoader 等輔助節點。
可以,可於 Step2 - Video size 群組調整影片尺寸,依 VRAM 容量決定品質。
可以,將影片長度設為 1,即可用 Wan2.2 當作文字轉圖像生成器。
使用 Wan2.2 Lighting LoRA 可縮短生成時間,但可能會失去影片動態效果。
相關工作流程
- Wan2.2
1.2 入門範本-圖像轉影片
- Qwen-Image-Edit, Wan2.2
1個圖像輸入分割堆疊 - Qwen多角度 + Wan 2.2
- Wan2.2, Z-Image-Turbo
AIrt MAchIne
- Wan2.2, Wan
Wan 2.2 14B Fun Camera控制
- Wan2.2, Wan
Wan 2.2 14B Fun Control
- Wan2.2, Wan
Wan 2.2 14B 趣味區域性重繪
- Wan2.2, Wan
Wan 2.2 5B Fun Control
- Wan2.2, Wan
Wan 2.2 5B Fun Inpaint
- Wan2.2, Wan
Wan 2.2 5B影片產生
- Wan2.2, Wan
Wan2.2-S2V 音訊驅動影片產生
- Wan, Wan2.2
Wan萬相 2.2 14B 圖生影片
- Wan2.2, Wan
Wan萬相 2.2 14B 首尾幀產生影片