Shot Edit: LTX VFX
Edit one detail of a finished shot with LTX VFX through the partner API. Pick a frame, repaint it in any image editor or image model, then send that frame…
下载工作流在 Cloud 中试用 API 文档
简介
Edit one detail of a finished shot with LTX VFX through the partner API. Pick a frame, repaint it in any image editor or image model, then send that frame…
你需要提供
- 正在读取工作流
在 ComfyUI 中运行。 此工作流无法在本页面运行。请下载后在 ComfyUI 中打开。
下载工作流此工作流暂无示例输出。
查看工作流内部
节点图的只读预览。在 Comfy Cloud 中打开或下载后即可编辑节点。
Loading the graph
Open full-size workflow preview- Comfy Cloud
- 是
- 输出
- 混合输出
- 作者
- 作者信息暂不可用
需要自定义节点
- 正在读取工作流
通过代码使用此工作流
尽可能根据工作流图和输入自动生成代码,否则显示已保存的示例。运行代码可能产生费用,请先核对凭据和端点。
1 获取 API 密钥 ↗
What you need
- Runs on
- Comfy Cloud
- 密钥
- COMFY_API_KEY
需要付费的 Cloud 方案和额度。
下载 API JSONAPI 文档 ↗
# Python 3.10+: pip install comfy-sdk==0.4.0
import os
from comfy_sdk import Comfy
api_key = os.environ.get("COMFY_API_KEY", "").strip()
if not api_key: raise RuntimeError("Set COMFY_API_KEY")
os.environ.setdefault("COMFY_BASE_URL", "https://cloud.comfy.org")
client = Comfy(api_key=api_key)
workflow = client.workflows.from_json({
"1": {
"class_type": "LoadVideo",
"inputs": {
"file": "masked_woman_desert_golden_hour.mp4"
},
"_meta": {
"title": "Load Video"
}
},
"3": {
"class_type": "LtxApiVideoShotEdit",
"inputs": {
"stills.frame_1": [
"109:108",
1
],
"stills.image_1": [
"106",
0
],
"video": [
"1",
0
]
},
"_meta": {
"title": "LtxApiVideoShotEdit"
}
},
"4": {
"class_type": "SaveVideo",
"inputs": {
"codec": "auto",
"filename_prefix": "video/LTX_VFX_shot_edit",
"format": "mp4",
"format.codec": "h264",
"format.codec.encoding": "auto",
"video": [
"3",
0
]
},
"_meta": {
"title": "Save Video"
}
},
"103": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"109:102",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"106": {
"class_type": "SaveImageAdvanced",
"inputs": {
"filename_prefix": "video/LTX_VFX_shot_edit_frame",
"format": "png",
"format.bit_depth": "8-bit",
"format.channels": "auto",
"format.input_color_space": "sRGB",
"images": [
"125",
0
]
},
"_meta": {
"title": "Save Image (Advanced)"
}
},
"125": {
"class_type": "GeminiImage2Node",
"inputs": {
"aspect_ratio": "auto",
"images": [
"103",
0
],
"model": "gemini-3-pro-image-preview",
"prompt": "Remove the silver spiked mask completely and reveal the bare face underneath:\nnatural skin with visible nose, lips, cheeks and jaw, the same eyes, same expression,\nno makeup change, no marks on the skin.\n\nKeep the hair, the sheer veil, the beaded collar, the pose, framing and lighting unchanged.\n\nReplace only the background: a dim stone corridor lit by warm candle sconces, deep\nshadow with soft warm falloff. Keep the woman, her bare face, hair, veil, beads,\npose, framing and the warm light on her skin unchanged.",
"resolution": "1K",
"response_modalities": "IMAGE+TEXT",
"seed": 42,
"system_prompt": "You are an expert image-generation engine. You must ALWAYS produce an image.\nInterpret all user input—regardless of format, intent, or abstraction—as literal visual directives for image composition.\nIf a prompt is conversational or lacks specific visual details, you must creatively invent a concrete visual scenario that depicts the concept.\nPrioritize generating the visual representation above any text, formatting, or conversational requests."
},
"_meta": {
"title": "Nano Banana Pro (Google Gemini Image)"
}
},
"109:100": {
"class_type": "GetVideoComponents",
"inputs": {
"video": [
"1",
0
]
},
"_meta": {
"title": "Get Video Components"
}
},
"109:102": {
"class_type": "ImageFromBatch",
"inputs": {
"batch_index": [
"109:108",
1
],
"image": [
"109:100",
0
],
"length": 1
},
"_meta": {
"title": "Get Image from Batch"
}
},
"109:107": {
"class_type": "PrimitiveFloat",
"inputs": {
"value": 0.1
},
"_meta": {
"title": "Float"
}
},
"109:108": {
"class_type": "ComfyMathExpression",
"inputs": {
"expression": "a * b",
"values.a": [
"109:100",
2
],
"values.b": [
"109:107",
0
]
},
"_meta": {
"title": "Math Expression"
}
}
})
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)