The Wan2.1 VACE Inpainting workflow is designed to seamlessly edit specific regions in video content while preserving the integrity of the surrounding areas. This is particularly useful for tasks such as object removal or replacement in video sequences. Utilizing the Wan2.1 model, this workflow leverages a combination of nodes including KSampler for sampling, CLIPTextEncode for text encoding, and VAEDecode for decoding video frames. The workflow is structured into several steps, starting from loading models and video files, to creating masks and compositing the final video output.
Technically, the workflow employs the WanVaceToVideo node to convert inpainted frames back into video format, while the TrimVideoLatent and CreateVideo nodes manage the video length and format. The ImageCompositeMasked node is crucial for blending the inpainted regions with the original video, ensuring a natural look. By using core nodes, the workflow avoids the need for additional custom installations, making it accessible and easy to implement. This workflow is particularly valuable for content creators and video editors who need to make precise edits without affecting the overall quality of the video.
API
Usa este flujo de trabajo desde código
Cada flujo de trabajo de Comfy es un grafo JSON. El siguiente payload es este flujo de trabajo, exactamente como lo ejecuta ComfyUI: descárgalo desde la URL, guárdalo en control de versiones o cárgalo en ComfyUI y ejecútalo nodo por nodo.
Ejecuta desde TypeScript o Python con el Comfy SDK. El mismo código funciona en Comfy Cloud o en un ComfyUI propio: solo cambia la URL base.
// Install (beta)
npm i @comfyorg/sdk
// Run "Wan2.1 VACE Inpainting" (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_wan_vace_inpainting_api.json");
const asset = client.assets.fromFile("input.png");
wf.setInput("162", "image", asset); // LoadImage
const job = await client.run(wf);
await job.getOutputs("69")[0].toFile("output.png"); // SaveVideoEl SDK utiliza un flujo de trabajo en formato API: abre este flujo de trabajo en ComfyUI y usa Archivo → Exportar flujo de trabajo (API).
El acceso a la API de Comfy Cloud requiere un plan con clave API.
Preguntas frecuentes















