本ComfyUI工作流通过SAM3驱动的掩膜和掩膜条件的LTX-2.3修复IC-LoRA,将视频中的物体移除,生成干净的背景底板。流程包括用VHS_LoadVideo/VHS_VideoInfo加载视频,GetVideoComponents提取帧,LoadSAM3Model→SAM3VideoSegmentation生成要移除物体的掩膜。SAM3Propagate跟踪掩膜,SAM3VideoOutput输出每帧OBJECT_MASK。为保证填充自然,LTXVDilateVideoMask扩展掩膜(如s10/t1),GrowMaskWithBlur羽化边缘。

掩膜区域由LTXVInpaintPreprocess填充绿色,CreateVideo重新编码这些预处理帧。绿色底板、OBJECT_MASK和仅描述背景的提示词一同输入LTX 2.3 In‑Outpainting IC‑LoRA(作为子工作流节点),该节点仅在掩膜区域内生成内容。VHS_GetImageCount、ComfyMathExpression和GetImageRangeFromBatch等工具节点可让你在全量运行前预览部分帧。最后,SaveVideo输出净底板结果,便于后续合成。

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.

8f2cf0df5da6.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 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.

常见问题

常见问题

查看所有工作流
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