Wan-Move Motion-Control Image to Video
Generate videos from a single image using Wan-Move, with fine-grained point-level motion control via trajectory guidance.
About
The Wan-Move Motion-Control Image to Video workflow is a sophisticated process designed to transform a single image into a dynamic video. Utilizing the Wan2.1 and Wan models, this workflow allows users to apply fine-grained motion control to specific points within an image, creating a seamless video output.
At its core, the workflow leverages nodes such as WanMoveVisualizeTracks and GenerateTracks to define and visualize motion trajectories. The user can guide these motions using trajectory guidance, ensuring precise and controlled animation of image elements. The CreateVideo and SaveVideo nodes then compile these movements into a cohesive video file.
This workflow is particularly useful for creators looking to animate still images with detailed motion paths, offering a high level of customization and control over the final video output.
What you provide
- Reading the workflow
Runs in ComfyUI. This workflow can't run on this page. Open it in Comfy Cloud with everything loaded, or download it for your own ComfyUI.
Try in CloudInside the workflow
A read-only preview of the node graph. Open it in Comfy Cloud or download it to edit the nodes.
Loading the graph
Open full-size workflow preview- Author
- ComfyUI
Requires custom nodes
- Reading the workflow
Use this workflow from code
Generated from the workflow graph and inputs when possible; stored examples are shown otherwise. Review credentials and endpoints before running code, which may incur charges.
What you need
- Runs on
- Comfy Cloud
- Key
- COMFY_API_KEY
Needs a paid Cloud plan and credits.
# 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({
"228": {
"class_type": "ImageScale",
"inputs": {
"crop": "center",
"height": 480,
"image": [
"238",
0
],
"upscale_method": "lanczos",
"width": 720
},
"_meta": {
"title": "Upscale Image"
}
},
"230": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"228",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"235": {
"class_type": "SaveVideo",
"inputs": {
"filename_prefix": "video/ComfyUI_WanMove",
"format": "auto",
"format.codec": "auto",
"video": [
"257:234",
0
]
},
"_meta": {
"title": "Save Video"
}
},
"238": {
"class_type": "LoadImage",
"inputs": {
"image": "snowboard_rush.png"
},
"_meta": {
"title": "Load Image"
}
},
"244": {
"class_type": "GenerateTracks",
"inputs": {
"bezier": True,
"end_x": 0.22,
"end_y": 0.45,
"height": 480,
"interpolation": "linear",
"mid_x": 0.46,
"mid_y": 0.44,
"num_frames": 81,
"num_tracks": 5,
"start_x": 0.6,
"start_y": 0.27,
"track_spread": 0.007,
"width": 720
},
"_meta": {
"title": "Generate Video Tracks"
}
},
"245": {
"class_type": "GenerateTracks",
"inputs": {
"bezier": True,
"end_x": 0.96,
"end_y": 0.16,
"height": 480,
"interpolation": "linear",
"mid_x": 0.88,
"mid_y": 0.72,
"num_frames": 81,
"num_tracks": 7,
"start_x": 0.48,
"start_y": 0.97,
"track_spread": 0.017,
"width": 720
},
"_meta": {
"title": "Generate Video Tracks"
}
},
"246": {
"class_type": "GenerateTracks",
"inputs": {
"bezier": True,
"end_x": 0.55,
"end_y": 0.63,
"height": 480,
"interpolation": "linear",
"mid_x": 0.42,
"mid_y": 0.96,
"num_frames": 81,
"num_tracks": 5,
"start_x": 0.12,
"start_y": 1,
"track_spread": 0.012,
"width": 720
},
"_meta": {
"title": "Generate Video Tracks"
}
},
"247": {
"class_type": "WanMoveConcatTrack",
"inputs": {
"tracks_1": [
"244",
0
],
"tracks_2": [
"245",
0
]
},
"_meta": {
"title": "WanMoveConcatTrack"
}
},
"248": {
"class_type": "WanMoveConcatTrack",
"inputs": {
"tracks_1": [
"247",
0
],
"tracks_2": [
"246",
0
]
},
"_meta": {
"title": "WanMoveConcatTrack"
}
},
"257:10": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "wan_2.1_vae.safetensors"
},
"_meta": {
"title": "Load VAE"
}
},
"257:131": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"257:144",
0
],
"vae": [
"257:10",
0
]
},
"_meta": {
"title": "VAE Decode"
}
},
"257:144": {
"class_type": "KSampler",
"inputs": {
"cfg": 1,
"denoise": 1,
"latent_image": [
"257:195",
2
],
"model": [
"257:61",
0
],
"negative": [
"257:195",
1
],
"positive": [
"257:195",
0
],
"sampler_name": "er_sde",
"scheduler": "simple",
"seed": 128,
"steps": 6
},
"_meta": {
"title": "KSampler"
}
},
"257:151": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"257:193",
0
],
"text": "cartoon character walking in a grassy meadow surrounded by trees"
},
"_meta": {
"title": "CLIP Text Encode (Prompt)"
}
},
"257:193": {
"class_type": "CLIPLoader",
"inputs": {
"clip_name": "umt5_xxl_fp8_e4m3fn_scaled.safetensors",
"device": "default",
"type": "wan"
},
"_meta": {
"title": "Load CLIP"
}
},
"257:195": {
"class_type": "WanMoveTrackToVideo",
"inputs": {
"batch_size": 1,
"clip_vision_output": [
"257:83",
0
],
"height": [
"257:226",
1
],
"length": 81,
"negative": [
"257:34",
0
],
"positive": [
"257:151",
0
],
"start_image": [
"228",
0
],
"strength": 1,
"tracks": [
"248",
0
],
"vae": [
"257:10",
0
],
"width": [
"257:226",
0
]
},
"_meta": {
"title": "WanMoveTrackToVideo"
}
},
"257:226": {
"class_type": "GetImageSize",
"inputs": {
"image": [
"228",
0
]
},
"_meta": {
"title": "Get Image Size"
}
},
"257:231": {
"class_type": "LoraLoaderModelOnly",
"inputs": {
"lora_name": "lightx2v_I2V_14B_480p_cfg_step_distill_rank64_bf16.safetensors",
"model": [
"257:232",
0
],
"strength_model": 1
},
"_meta": {
"title": "Load LoRA"
}
},
"257:232": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "Wan21-WanMove_fp8_scaled_e4m3fn_KJ.safetensors",
"weight_dtype": "default"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"257:234": {
"class_type": "CreateVideo",
"inputs": {
"bit_depth": "auto",
"codec": "none",
"color_space": "sRGB",
"fps": 16,
"images": [
"257:131",
0
]
},
"_meta": {
"title": "Create Video"
}
},
"257:34": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"257:193",
0
],
"text": "色调艳丽,过曝,静态,细节模糊不清,字幕,风格,作品,画作,画面,静止,整体发灰,最差质量,低质量,JPEG压缩残留,丑陋的,残缺的,多余的手指,画得不好的手部,画得不好的脸部,畸形的,毁容的,形态畸形的肢体,手指融合,静止不动的画面,杂乱的背景,三条腿,背景人很多,倒着走"
},
"_meta": {
"title": "CLIP Text Encode (Prompt)"
}
},
"257:61": {
"class_type": "ModelSamplingSD3",
"inputs": {
"model": [
"257:231",
0
],
"shift": 5
},
"_meta": {
"title": "ModelSamplingSD3"
}
},
"257:83": {
"class_type": "CLIPVisionEncode",
"inputs": {
"clip_vision": [
"257:84",
0
],
"crop": "center",
"image": [
"228",
0
]
},
"_meta": {
"title": "CLIP Vision Encode"
}
},
"257:84": {
"class_type": "CLIPVisionLoader",
"inputs": {
"clip_name": "clip_vision_h.safetensors"
},
"_meta": {
"title": "Load CLIP Vision"
}
}
})
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)Questions & answers
You need the Wan2.1 and Wan models to effectively use this workflow.
Yes, you can use any image, but results may vary based on the complexity and detail of the motion paths you create.
You can create motion paths using the GenerateTracks node and visualize them with the WanMoveVisualizeTracks node. For more control, use the WanMoveTracksFromCoords node.
Yes, you can use the PreviewImage node to see how your motion paths will affect the image before creating the final video.