Wan ATI
Génération de vidéo contrôlée par trajectoire.
À propos
Ce workflow ComfyUI génère de courtes vidéos guidées par prompt à partir d’une seule image tout en suivant précisément une trajectoire de caméra ou de sujet définie par l’utilisateur. Il utilise le modèle Wan 2.1 I2V ATI pour combiner guidage texte, image de référence et JSON de trajectoire afin que le mouvement de la caméra ou de l’objet ne soit pas laissé au hasard. Les nœuds principaux incluent UNETLoader (Wan2_1-I2V-ATI-14B_fp8_e4m3fn.safetensors) et VAELoader (wan_2.1_vae.safetensors) pour la diffusion, CLIPLoader et CLIPTextEncode pour le conditionnement du prompt, CLIPVisionLoader et CLIPVisionEncode pour le conditionnement image, et WanTrackToVideo pour appliquer le contrôle de trajectoire. KSampler (piloté par ModelSamplingSD3) effectue le débruitage, VAEDecode transforme les latents en images, et CreateVideo + SaveVideo assemble le résultat.
Techniquement, le workflow encode vos prompts positifs/négatifs via CLIPTextEncode et extrait les caractéristiques visuelles de l’image d’entrée avec CLIPVisionEncode. Le nœud PrimitiveStringMultiline contient le JSON de trajectoire exporté depuis Trajectory-Annotation-Tool ; WanTrackToVideo consomme ce JSON et injecte le contrôle de mouvement image par image dans le processus de sampling. ModelSamplingSD3 configure le scheduler pour que KSampler débruite de façon compatible avec l’entraînement de Wan 2.1. Après sampling, VAEDecode reconstruit les images, et CreateVideo les assemble à la résolution et FPS choisis. Sur un 4090D 24Go en 720x480, comptez environ 500 secondes pour un premier run à froid et 463 secondes pour les suivants (temps réel variable selon les réglages).
Ce que vous fournissez
- Lecture du workflow
S’exécute dans ComfyUI. Ce workflow ne peut pas s’exécuter sur cette page. Ouvrez-le dans Comfy Cloud, avec tout déjà chargé, ou téléchargez-le pour votre propre ComfyUI.
Essayer dans CloudDans le workflow
Un aperçu en lecture seule du graphe de nœuds. Ouvrez-le dans Comfy Cloud ou téléchargez-le pour modifier les nœuds.
Loading the graph
Open full-size workflow previewFichiers de ce workflow
- Auteur
- ComfyUI
Nécessite des nœuds personnalisés
- Lecture du workflow
Utiliser ce workflow depuis du code
Généré à partir du graphe et des entrées du workflow lorsque cela est possible ; sinon, les exemples enregistrés sont affichés. Vérifiez les identifiants et les points de terminaison avant d’exécuter le code, ce qui peut entraîner des frais.
What you need
- Runs on
- Comfy Cloud
- Clé
- COMFY_API_KEY
Nécessite un forfait Cloud payant et des crédits.
# 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)Questions-réponses
La variante ATI accepte un conditionnement par trajectoire pour que le modèle suive un mouvement défini par l’utilisateur. Ici, WanTrackToVideo lit le JSON de trajectoire et injecte ce contrôle dans le sampling, offrant un mouvement caméra ou sujet reproductible et guidé.
Gardez la trajectoire fluide dans l’outil d’annotation, faites correspondre le ratio et le nombre d’images entre l’outil et le workflow, fixez le seed pour la reproductibilité, et commencez avec un CFG modéré (ex : 4–7) et suffisamment de steps. Si le mouvement tremble encore, simplifiez ou lissez la trajectoire et réduisez les prompts de style conflictuels.
Un GPU de 24 Go VRAM (ex : classe 4090) gère confortablement du 720x480 avec un nombre d’images classique ; les premiers runs prennent souvent 500 secondes, puis plus rapide grâce au cache. Avec moins de VRAM, baissez la résolution ou le nombre d’images. Surveillez l’utilisation dans ComfyUI et ajustez taille/FPS en conséquence.
Oui. Gardez le même JSON de trajectoire et l’image de référence pour un mouvement et une composition constants, puis variez le prompt texte, le CFG ou les steps pour changer le style. Pour des changements majeurs de composition ou d’échelle, mettez à jour la trajectoire.