Wan萬相運動控制圖生影片
使用 Wan-Move 從單張圖片產生影片,並透過軌跡引導實現精細的點級運動控制。
下載工作流程在 Cloud 中試用 API 文件
關於
Wan-Move 動作控制影像轉影片工作流程,能將單張影像轉換為動態影片。結合 Wan2.1 與 Wan 模型,讓使用者針對影像特定點位進行細緻動作控制,產生流暢影片。流程運用 WanMoveVisualizeTracks 與 GenerateTracks 節點定義並視覺化動作軌跡,使用者可透過軌跡引導精確調整影像元素動畫。CreateVideo 與 SaveVideo 節點將這些動作組合成影片檔。此流程特別適合希望將靜態影像以自訂動作路徑動畫化的創作者,提供高度自訂與控制。
您提供的內容
- 正在讀取工作流程
在 ComfyUI 中執行。 此工作流程無法在此頁面上執行。請在已載入所有內容的 Comfy Cloud 中開啟,或下載到您自己的 ComfyUI。
在 Cloud 中試用範例
工作流程內部
節點圖的唯讀預覽。請在 Comfy Cloud 中開啟,或下載後編輯節點。
從程式碼使用此工作流程
可行時會根據工作流程圖和輸入內容產生;否則會顯示儲存的範例。執行可能產生費用的程式碼前,請檢查認證資訊和端點。
1 取得 API 金鑰 ↗
What you need
- Runs on
- Comfy Cloud
- 金鑰
- COMFY_API_KEY
需要付費 Cloud 方案與點數。
下載 API JSONAPI 文件 ↗
# 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)問答
需安裝 Wan2.1 與 Wan 模型。
可以,但動作路徑複雜度與影像細節會影響最終效果。
可用 GenerateTracks 節點建立,並以 WanMoveVisualizeTracks 節點視覺化。需更細緻控制時,請用 WanMoveTracksFromCoords 節點。
可以,請用 PreviewImage 節點預覽動作路徑對影像的影響,再進行影片生成。
相關工作流程
- 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.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.1, Wan
Wan ATI
- Wan2.1, Wan
Wan VACE控制影片