Wan 2.2 5B Video Generation

This ComfyUI workflow demonstrates fast, high-quality text-to-video and image-to-video generation using the Wan 2.2 5B model. It wires together the essential building blocks: UNETLoader loads the Wan2.2 diffusion backbone, CLIPLoader and CLIPTextEncode turn your positive and negative prompts into conditioning, and ModelSamplingSD3 configures the sampler so KSampler can produce temporally consistent latents. For pure text-to-video, the diffusion model starts from noise; for image-to-video, Wan22ImageToVideoLatent injects structure and motion cues from a source image to initialize or steer the sequence.

Once frames are synthesized in latent space, VAELoader brings in the Wan 2.2 VAE and VAEDecode turns latents into RGB frames. CreateVideo assembles those frames at your chosen FPS and length, and SaveVideo writes the final clip to disk. The workflow is organized into helpful groups: Step1 - Load models to point at wan2.2_ti2v_5B_fp16.safetensors and wan2.2_vae.safetensors, Step3 - Prompt to edit text conditioning, a Video Size & length group to set resolution and frame count, and a For i2v, use Ctrl + B to enable branch that converts a still image into a moving shot. It’s optimized for rapid prototyping—tweak prompts, steps, and sizes, then iterate quickly to explore ideas.

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/f83ee3caa04e.json
Fetching 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 5B Video Generation" (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_5B_ti2v_api.json")

asset = client.assets.from_file("input.png")
wf.set_input("56", "image", asset)  # LoadImage

wf.set_input("6", "text", "your prompt here")  # CLIPTextEncode

job = client.run(wf)
for output in job.get_outputs("58"):  # 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

Frequently Asked Questions

View all workflows
Character
Cinematic
Image to Video
Lip Sync
Multiple Angles
Portrait
Style Reference
Style Transfer
Text to Video
Video Generation
Video
Showing 30 of 30 templates