Wan2.2-S2V Audio-Driven Video Generation

This ComfyUI workflow turns a single reference image and an audio track into a synchronized video using the Wan 2.2 S2V (sound-to-video) model. It loads the Wan backbone with UNETLoader, CLIPLoader, and VAELoader, and sets the correct schedule via ModelSamplingSD3. Your text prompt is encoded by CLIPTextEncode, while the audio is processed by AudioEncoderLoader and AudioEncoderEncode. These signals, together with the image from LoadImage, drive WanSoundImageToVideo to synthesize motion that follows the rhythm and phrasing of the audio. The KSampler controls steps, CFG, and seed; VAEDecode converts latents to frames; and CreateVideo assembles the final clip.

Two engineering details make the workflow practical for production: a first-frame stabilization and scalable length. The Fix overbaked first frame group uses LatentCut and LatentConcat to duplicate the initial latent frame before decoding, then discards the first decoded frame to avoid the common VAE “overbaked” look on frame 0. For long clips, the Video S2V Extend subgraphs let you chain segments in chunks (77 frames by default) using LatentCut/LatentConcat, so you can build minute-level videos without blowing up VRAM. The workflow also supports a lightning path: with a Wan 2.2 lightning LoRA you can sample in 4 steps (recommended CFG ~1.0). If you prefer quality and stability, use the standard path at ~20 steps (CFG ~6.0).

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.

video_wan2_2_14B_s2v.json
Fetching workflow JSON…

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 "Wan2.2-S2V Audio-Driven Video Generation" (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_s2v_api.json");

const asset = client.assets.fromFile("input.png");
wf.setInput("52", "image", asset); // LoadImage

wf.setInput("6", "text", "your prompt here"); // CLIPTextEncode

const job = await client.run(wf);
await job.getOutputs("113")[0].toFile("output.png"); // SaveVideo

The 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

Frequently Asked Questions

View all workflows
Showing 30 of 30 templates