
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.
Run it from TypeScript or Python with the Comfy SDK. The same code targets Comfy Cloud or a ComfyUI you host yourself — only the base URL changes.
// Install (beta)
npm i @comfyorg/sdk
// Run "Wan 2.2 14B Fun Control" (TypeScript)
import { Comfy } from "@comfyorg/sdk";
const client = new Comfy({ apiKey: "comfyui-..." });
// This workflow, exported in API format (see note below)
const wf = await client.workflows.fromFile("video_wan2_2_14B_fun_control_api.json");
const asset = client.assets.fromFile("input.png");
wf.setInput("145", "image", asset); // LoadImage
wf.setInput("179", "text", "your prompt here"); // CLIPTextEncode
const job = await client.run(wf);
await job.getOutputs("170")[0].toFile("output.png"); // SaveVideoThe SDK takes a workflow in API format: open this workflow in ComfyUI and use File → Export Workflow (API).
Comfy Cloud API access requires a plan with an API key.
FAQ













