本ComfyUI教程演示如何用GeminiVideoOmni节点实现服装替换。用LoadVideo(Your Footage)加载人物视频,用LoadImage(Outfit Reference)加载单张服装照片。GeminiVideoOmni节点接收这些输入及一条自然语言指令(通过PrimitiveNode提供),将参考服装映射到视频中的运动主体,同时保留身份、动作、镜头构图和原始背景。结果通过SaveVideo节点输出。
技术上,该工作流让视频感知生成模型同时参考源视频帧和服装图片。源视频引导结构和动作,确保面部、手部和环境稳定,参考图则引导服装在各帧中的外观,实现时序一致。工作流中的MarkdownNote节点仅用于流程说明,不影响处理。无需手动抠像或遮罩,适合快速虚拟试衣、时尚概念设计和造型预览。
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 this workflow (TypeScript)
import { Comfy } from "@comfyorg/sdk";
const client = new Comfy({ apiKey: "comfyui-..." });
const wf = await client.workflows.fromFile("workflow_api.json");
const job = await client.run(wf);
await job.getOutputs("<output-node-id>")[0].toFile("output.png");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.
常见问题














