
The 'Wan 2.2 5B Fun Inpaint' workflow is designed for efficient video inpainting, leveraging the power of the Wan2.2 model. This workflow is particularly useful for generating video content by interpolating between start and end frames, allowing for creative exploration and testing of video generation techniques. The workflow employs a series of nodes, including KSampler for sampling, CLIPTextEncode for text prompt encoding, and VAEDecode for decoding latent variables into visual outputs. By using the Wan2.2 model, this workflow ensures high-quality video generation with quick iteration times, making it ideal for both experimentation and production scenarios.
Technically, the workflow is structured into several key steps. Initially, models are loaded using nodes like UNETLoader and VAELoader, setting the stage for video generation. The process continues with the creation of prompts using the CLIPTextEncode node, which guides the visual style and content of the video. The workflow then specifies the start image and video parameters, such as size and length, using nodes like LoadImage and CreateVideo. Finally, the video is generated and saved using the SaveVideo node, completing the inpainting process. This structured approach makes the workflow both efficient and flexible, catering to a wide range of video generation needs.
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 5B Fun Inpaint" (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_5B_fun_inpaint_api.json");
const asset = client.assets.fromFile("input.png");
wf.setInput("70", "image", asset); // LoadImage
wf.setInput("6", "text", "Flowers are in full bloom, time-lapse photography"); // CLIPTextEncode
const job = await client.run(wf);
await job.getOutputs("58")[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













