
This ComfyUI tutorial workflow demonstrates how to generate controllable videos with Wan2.2 Fun Control (14B), guided by pose, depth, and edge inputs. At its core, the Wan22FunControlToVideo node fuses your text prompt from CLIPTextEncode with one or more control streams derived from a reference video. The model stack loads via UNETLoader and VAELoader, while CLIPLoader and CLIPTextEncode provide multilingual text conditioning. Sampling runs through ModelSamplingSD3 with KSamplerAdvanced to balance quality, speed, and control strength. Finally, VAEDecode reconstructs frames and SaveVideo exports the result.
You can preprocess control videos directly in the graph: LoadVideo and GetVideoComponents ingest your footage, Canny extracts edges, and optional custom nodes (comfyui_controlnet_aux and ComfyUI-DepthAnythingV2) add pose/depth maps. CreateVideo sets resolution, frame count, and FPS to match Wan2.2’s training regime (multi-resolution 512/768/1024, 81 frames at 16 FPS). The Start_image group lets you anchor the first frame with LoadImage for a consistent subject/look. An optional LoraLoaderModelOnly applies the Wan2.2 Lighting LoRA for faster renders at the cost of reduced motion dynamics. This gives you a flexible, reproducible pipeline for video-to-video generation with reliable structure preservation and style control.
API
Use this workflow from code
Every Comfy workflow is a JSON graph. The payload below is this workflow, exactly as ComfyUI runs it — fetch it from the URL, keep it in version control, or load it in ComfyUI and run it node by node.
GET https://comfy.org/workflows/download/67a816af8a73.jsonFetching workflow JSON…
Run it from Python or TypeScript with the Comfy SDK. The same code targets Comfy Cloud or a ComfyUI you host yourself — only the base URL changes.
# Install (beta)
pip install comfy-sdk # Python
npm i @comfyorg/sdk # TypeScript
# Run "Wan 2.2 14B Fun Control" (Python)
from comfy_sdk import Comfy
client = Comfy(api_key="comfyui-...")
# This workflow, exported in API format (see note below)
wf = client.workflows.from_file("video_wan2_2_14B_fun_control_api.json")
asset = client.assets.from_file("input.png")
wf.set_input("145", "image", asset) # LoadImage
wf.set_input("179", "text", "your prompt here") # CLIPTextEncode
job = client.run(wf)
for output in job.get_outputs("170"): # SaveVideo
output.to_file(output.name)The SDK takes a workflow in API format: open this workflow in ComfyUI and use File → Export Workflow (API). API access requires a Comfy Cloud plan with an API key. SDK docs · Get an API key
FAQ














