Wan ATI
軌跡控制影片產生。
關於
此 ComfyUI 工作流程可從單張圖片產生短片段、以提示詞驅動的影片,同時精準遵循使用者定義的相機或主體路徑。它使用 Wan 2.1 I2V ATI 模型,將文字引導、參考圖像與軌跡 JSON 融合,讓相機運動或物件動作可被明確控制。核心節點包括 UNETLoader(Wan2_1-I2V-ATI-14B_fp8_e4m3fn.safetensors)與 VAELoader(wan_2.1_vae.safetensors)作為擴散骨幹,CLIPLoader 與 CLIPTextEncode 用於提示詞條件設定,CLIPVisionLoader 與 CLIPVisionEncode 用於影像條件設定,以及 WanTrackToVideo 用於套用軌跡控制。KSampler(由 ModelSamplingSD3 驅動)負責去雜訊,VAEDecode 將潛空間轉為影格,CreateVideo + SaveVideo 封裝成影片。
在技術上,工作流程透過 CLIPTextEncode 編碼正向/負向提示詞,並使用 CLIPVisionEncode 從輸入圖像擷取視覺特徵。PrimitiveStringMultiline 節點用來存放由 Trajectory-Annotation-Tool 匯出的軌跡 JSON;WanTrackToVideo 會讀取該 JSON,將逐影格的運動控制注入取樣流程。ModelSamplingSD3 會設定調度器,使 KSampler 的去雜訊方式與 Wan 2.1 的訓練設定相容。取樣完成後,VAEDecode 重建影格,CreateVideo 依你選擇的解析度與 FPS 組裝。以 4090D 24GB 在 720x480 為例,首次冷啟動執行約需 500 秒,權重快取後後續執行約 463 秒(實際時間會隨設定而異)。
您提供的內容
- 正在讀取工作流程
在 ComfyUI 中執行。 此工作流程無法在此頁面上執行。請在已載入所有內容的 Comfy Cloud 中開啟,或下載到您自己的 ComfyUI。
在 Cloud 中試用工作流程內部
節點圖的唯讀預覽。請在 Comfy Cloud 中開啟,或下載後編輯節點。
Loading the graph
Open full-size workflow preview從程式碼使用此工作流程
可行時會根據工作流程圖和輸入內容產生;否則會顯示儲存的範例。執行可能產生費用的程式碼前,請檢查認證資訊和端點。
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({
"3": {
"class_type": "KSampler",
"inputs": {
"cfg": 3,
"denoise": 1,
"latent_image": [
"248",
2
],
"model": [
"48",
0
],
"negative": [
"248",
1
],
"positive": [
"248",
0
],
"sampler_name": "uni_pc",
"scheduler": "simple",
"seed": 48,
"steps": 20
},
"_meta": {
"title": "KSampler"
}
},
"6": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"38",
0
],
"text": "The white dragon warrior stands still, eyes full of determination and strength. The camera slowly moves closer or circles around the warrior, highlighting the powerful presence and heroic spirit of the character."
},
"_meta": {
"title": "CLIP Text Encode (Positive Prompt)"
}
},
"7": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"38",
0
],
"text": "过曝,静态,细节模糊不清,字幕,风格,作品,画作,画面,静止,整体发灰,最差质量,低质量,JPEG压缩残留,丑陋的,残缺的,多余的手指,画得不好的手部,画得不好的脸部,畸形的,毁容的,形态畸形的肢体,手指融合,静止不动的画面,杂乱的背景,三条腿,背景人很多,倒着走,过曝,"
},
"_meta": {
"title": "CLIP Text Encode (Negative Prompt)"
}
},
"8": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"3",
0
],
"vae": [
"39",
0
]
},
"_meta": {
"title": "VAE Decode"
}
},
"38": {
"class_type": "CLIPLoader",
"inputs": {
"clip_name": "umt5_xxl_fp8_e4m3fn_scaled.safetensors",
"device": "default",
"type": "wan"
},
"_meta": {
"title": "Load CLIP"
}
},
"39": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "wan_2.1_vae.safetensors"
},
"_meta": {
"title": "Load VAE"
}
},
"48": {
"class_type": "ModelSamplingSD3",
"inputs": {
"model": [
"140",
0
],
"shift": 8.000000000000002
},
"_meta": {
"title": "ModelSamplingSD3"
}
},
"140": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "Wan2_1-I2V-ATI-14B_fp8_e4m3fn.safetensors",
"weight_dtype": "fp8_e4m3fn"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"240": {
"class_type": "LoadImage",
"inputs": {
"image": "video_wan_ati_input_image.jpg"
},
"_meta": {
"title": "Load Image"
}
},
"244": {
"class_type": "CLIPVisionLoader",
"inputs": {
"clip_name": "clip_vision_h.safetensors"
},
"_meta": {
"title": "Load CLIP Vision"
}
},
"247": {
"class_type": "PrimitiveStringMultiline",
"inputs": {
"value": "[\n [\n {\n \"x\": 393,\n \"y\": 126\n },\n {\n \"x\": 393,\n \"y\": 126\n },\n {\n \"x\": 393,\n \"y\": 126\n },\n {\n \"x\": 393,\n \"y\": 125\n },\n {\n \"x\": 388,\n \"y\": 123\n },\n {\n \"x\": 380,\n \"y\": 123\n },\n {\n \"x\": 372,\n \"y\": 122\n },\n {\n \"x\": 338,\n \"y\": 122\n },\n {\n \"x\": 312,\n \"y\": 121\n },\n {\n \"x\": 294,\n \"y\": 121\n },\n {\n \"x\": 281,\n \"y\": 122\n },\n {\n \"x\": 263,\n \"y\": 123\n },\n {\n \"x\": 254,\n \"y\": 125\n },\n {\n \"x\": 245,\n \"y\": 126\n },\n {\n \"x\": 241,\n \"y\": 127\n },\n {\n \"x\": 240,\n \"y\": 127\n },\n {\n \"x\": 240,\n \"y\": 128\n },\n {\n \"x\": 239,\n \"y\": 128\n },\n {\n \"x\": 238,\n \"y\": 130\n },\n {\n \"x\": 236,\n \"y\": 131\n },\n {\n \"x\": 233,\n \"y\": 133\n },\n {\n \"x\": 230,\n \"y\": 135\n },\n {\n \"x\": 226,\n \"y\": 137\n },\n {\n \"x\": 226,\n \"y\": 137\n },\n {\n \"x\": 226,\n \"y\": 137\n },\n {\n \"x\": 226,\n \"y\": 138\n },\n {\n \"x\": 226,\n \"y\": 138\n },\n {\n \"x\": 226,\n \"y\": 138\n },\n {\n \"x\": 226,\n \"y\": 139\n },\n {\n \"x\": 226,\n \"y\": 139\n },\n {\n \"x\": 226,\n \"y\": 141\n },\n {\n \"x\": 226,\n \"y\": 142\n },\n {\n \"x\": 226,\n \"y\": 142\n },\n {\n \"x\": 228,\n \"y\": 143\n },\n {\n \"x\": 229,\n \"y\": 143\n },\n {\n \"x\": 230,\n \"y\": 144\n },\n {\n \"x\": 232,\n \"y\": 145\n },\n {\n \"x\": 237,\n \"y\": 146\n },\n {\n \"x\": 238,\n \"y\": 146\n },\n {\n \"x\": 246,\n \"y\": 147\n },\n {\n \"x\": 252,\n \"y\": 149\n },\n {\n \"x\": 260,\n \"y\": 150\n },\n {\n \"x\": 262,\n \"y\": 150\n },\n {\n \"x\": 265,\n \"y\": 150\n },\n {\n \"x\": 271,\n \"y\": 151\n },\n {\n \"x\": 276,\n \"y\": 151\n },\n {\n \"x\": 278,\n \"y\": 151\n },\n {\n \"x\": 281,\n \"y\": 151\n },\n {\n \"x\": 286,\n \"y\": 152\n },\n {\n \"x\": 289,\n \"y\": 152\n },\n {\n \"x\": 292,\n \"y\": 152\n },\n {\n \"x\": 296,\n \"y\": 152\n },\n {\n \"x\": 299,\n \"y\": 152\n },\n {\n \"x\": 307,\n \"y\": 153\n },\n {\n \"x\": 311,\n \"y\": 153\n },\n {\n \"x\": 315,\n \"y\": 154\n },\n {\n \"x\": 317,\n \"y\": 154\n },\n {\n \"x\": 320,\n \"y\": 155\n },\n {\n \"x\": 324,\n \"y\": 155\n },\n {\n \"x\": 326,\n \"y\": 157\n },\n {\n \"x\": 327,\n \"y\": 157\n },\n {\n \"x\": 328,\n \"y\": 157\n },\n {\n \"x\": 331,\n \"y\": 158\n },\n {\n \"x\": 332,\n \"y\": 158\n },\n {\n \"x\": 333,\n \"y\": 158\n },\n {\n \"x\": 335,\n \"y\": 159\n },\n {\n \"x\": 340,\n \"y\": 159\n },\n {\n \"x\": 345,\n \"y\": 160\n },\n {\n \"x\": 353,\n \"y\": 161\n },\n {\n \"x\": 357,\n \"y\": 162\n },\n {\n \"x\": 362,\n \"y\": 163\n },\n {\n \"x\": 367,\n \"y\": 165\n },\n {\n \"x\": 369,\n \"y\": 165\n },\n {\n \"x\": 372,\n \"y\": 166\n },\n {\n \"x\": 375,\n \"y\": 166\n },\n {\n \"x\": 378,\n \"y\": 166\n },\n {\n \"x\": 379,\n \"y\": 167\n },\n {\n \"x\": 381,\n \"y\": 167\n },\n {\n \"x\": 384,\n \"y\": 167\n },\n {\n \"x\": 387,\n \"y\": 168\n },\n {\n \"x\": 392,\n \"y\": 169\n },\n {\n \"x\": 400,\n \"y\": 170\n },\n {\n \"x\": 405,\n \"y\": 170\n },\n {\n \"x\": 410,\n \"y\": 170\n },\n {\n \"x\": 417,\n \"y\": 171\n },\n {\n \"x\": 425,\n \"y\": 174\n },\n {\n \"x\": 434,\n \"y\": 174\n },\n {\n \"x\": 441,\n \"y\": 175\n },\n {\n \"x\": 448,\n \"y\": 175\n },\n {\n \"x\": 456,\n \"y\": 176\n },\n {\n \"x\": 465,\n \"y\": 177\n },\n {\n \"x\": 472,\n \"y\": 177\n },\n {\n \"x\": 479,\n \"y\": 177\n },\n {\n \"x\": 484,\n \"y\": 177\n },\n {\n \"x\": 491,\n \"y\": 178\n },\n {\n \"x\": 498,\n \"y\": 179\n },\n {\n \"x\": 502,\n \"y\": 179\n },\n {\n \"x\": 505,\n \"y\": 179\n },\n {\n \"x\": 514,\n \"y\": 179\n },\n {\n \"x\": 520,\n \"y\": 179\n },\n {\n \"x\": 523,\n \"y\": 181\n },\n {\n \"x\": 530,\n \"y\": 181\n },\n {\n \"x\": 537,\n \"y\": 182\n },\n {\n \"x\": 544,\n \"y\": 183\n },\n {\n \"x\": 551,\n \"y\": 183\n },\n {\n \"x\": 554,\n \"y\": 183\n },\n {\n \"x\": 561,\n \"y\": 184\n },\n {\n \"x\": 569,\n \"y\": 185\n },\n {\n \"x\": 577,\n \"y\": 186\n },\n {\n \"x\": 581,\n \"y\": 186\n },\n {\n \"x\": 586,\n \"y\": 186\n },\n {\n \"x\": 590,\n \"y\": 187\n },\n {\n \"x\": 596,\n \"y\": 187\n },\n {\n \"x\": 600,\n \"y\": 189\n },\n {\n \"x\": 602,\n \"y\": 189\n },\n {\n \"x\": 607,\n \"y\": 189\n },\n {\n \"x\": 612,\n \"y\": 190\n },\n {\n \"x\": 614,\n \"y\": 190\n },\n {\n \"x\": 616,\n \"y\": 190\n },\n {\n \"x\": 617,\n \"y\": 190\n },\n {\n \"x\": 617,\n \"y\": 190\n },\n {\n \"x\": 619,\n \"y\": 191\n },\n {\n \"x\": 619,\n \"y\": 191\n },\n {\n \"x\": 620,\n \"y\": 191\n },\n {\n \"x\": 620,\n \"y\": 191\n },\n {\n \"x\": 621,\n \"y\": 191\n },\n {\n \"x\": 623,\n \"y\": 191\n },\n {\n \"x\": 624,\n \"y\": 191\n },\n {\n \"x\": 625,\n \"y\": 191\n },\n {\n \"x\": 625,\n \"y\": 192\n },\n {\n \"x\": 625,\n \"y\": 192\n },\n {\n \"x\": 625,\n \"y\": 192\n },\n {\n \"x\": 628,\n \"y\": 197\n },\n {\n \"x\": 628,\n \"y\": 199\n },\n {\n \"x\": 629,\n \"y\": 200\n },\n {\n \"x\": 629,\n \"y\": 201\n },\n {\n \"x\": 629,\n \"y\": 202\n },\n {\n \"x\": 629,\n \"y\": 202\n },\n {\n \"x\": 629,\n \"y\": 203\n },\n {\n \"x\": 629,\n \"y\": 203\n },\n {\n \"x\": 629,\n \"y\": 203\n },\n {\n \"x\": 629,\n \"y\": 203\n },\n {\n \"x\": 629,\n \"y\": 203\n },\n {\n \"x\": 630,\n \"y\": 205\n },\n {\n \"x\": 630,\n \"y\": 205\n },\n {\n \"x\": 630,\n \"y\": 206\n },\n {\n \"x\": 630,\n \"y\": 207\n },\n {\n \"x\": 630,\n \"y\": 207\n },\n {\n \"x\": 630,\n \"y\": 208\n },\n {\n \"x\": 630,\n \"y\": 208\n },\n {\n \"x\": 631,\n \"y\": 211\n },\n {\n \"x\": 631,\n \"y\": 211\n },\n {\n \"x\": 631,\n \"y\": 213\n },\n {\n \"x\": 631,\n \"y\": 215\n },\n {\n \"x\": 632,\n \"y\": 215\n },\n {\n \"x\": 632,\n \"y\": 216\n },\n {\n \"x\": 632,\n \"y\": 216\n },\n {\n \"x\": 632,\n \"y\": 216\n },\n {\n \"x\": 632,\n \"y\": 217\n },\n {\n \"x\": 632,\n \"y\": 217\n },\n {\n \"x\": 632,\n \"y\": 218\n },\n {\n \"x\": 632,\n \"y\": 218\n }\n ]\n]"
},
"_meta": {
"title": "Trajectory JSON"
}
},
"248": {
"class_type": "WanTrackToVideo",
"inputs": {
"batch_size": 1,
"clip_vision_output": [
"251",
0
],
"height": 480,
"length": 81,
"negative": [
"7",
0
],
"positive": [
"6",
0
],
"start_image": [
"240",
0
],
"temperature": 220,
"topk": 10,
"tracks": [
"247",
0
],
"vae": [
"39",
0
],
"width": 720
},
"_meta": {
"title": "WanTrackToVideo"
}
},
"251": {
"class_type": "CLIPVisionEncode",
"inputs": {
"clip_vision": [
"244",
0
],
"crop": "none",
"image": [
"240",
0
]
},
"_meta": {
"title": "CLIP Vision Encode"
}
},
"257": {
"class_type": "CreateVideo",
"inputs": {
"bit_depth": "auto",
"codec": "none",
"color_space": "sRGB",
"fps": 16,
"images": [
"8",
0
]
},
"_meta": {
"title": "Create Video"
}
},
"258": {
"class_type": "SaveVideo",
"inputs": {
"filename_prefix": "video/ComfyUI",
"format": "auto",
"format.codec": "auto",
"video": [
"257",
0
]
},
"_meta": {
"title": "Save Video"
}
}
})
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)問答
The ATI variant accepts trajectory conditioning so the model follows a user-defined motion path. In this workflow, WanTrackToVideo reads the trajectory JSON and injects that control into sampling, giving you reproducible, path-driven camera or subject movement.
Keep the trajectory smooth in the annotation tool, match aspect ratio and frame count between the tool and the workflow, fix the seed for repeatability, and start with moderate CFG (e.g., 4–7) and sufficient steps. If motion still wobbles, simplify or smooth the path and reduce conflicting style prompts.
A 24 GB VRAM GPU (e.g., 4090-class) comfortably handles 720x480 with typical frame counts; first runs often take around 500 seconds, with later runs faster as weights are cached. With less VRAM, lower resolution or reduce frames. Watch usage in ComfyUI and adjust size/FPS accordingly.
Yes. Keep the same trajectory JSON and reference image if you want consistent motion and composition, then vary the text prompt, CFG, or steps to change style. For major layout or scale changes, update the trajectory to match the new intent.
相關工作流程
- Wan2.1, ChronoEdit, Nvidia
ChronoEdit 14B:圖像編輯
- Wan2.1, ChronoEdit, Nvidia
ChronoEdit 14B:圖像編輯
- Wan2.1, Wan
Wan 2.1 ControlNet
- Wan2.1, Wan
Wan 2.1 Fun Camera 1.3B
- Wan2.1, Wan
Wan 2.1 Fun Camera 14B
- Wan2.1, Wan
Wan 2.1 首尾幀影片 720p F16
- Wan2.1, Wan
Wan VACE控制影片
- Wan2.1, Wan
Wan2.1 Alpha 文生影片
- Wan2.1, Wan
Wan2.1 VACE 區域性重繪
- Wan2.1, Wan
Wan2.1 VACE 參考生影片
- Wan2.1, Wan
Wan2.1 VACE 擴圖
- Wan2.1, Wan
Wan2.1 VACE 文生影片