Turn a product photo into a video
Turn a product photograph into a sequence of showcase clips.
下载工作流在 Cloud 中试用 API 文档
00:00
查看工作流内部
源模板的只读预览。在 Cloud 中打开,即可查看节点并进行修改。
Loading the graph
Open full-size workflow preview- 作者
- Rob
从代码中调用该模型
以下请求使用与体验区相同的预设图和设置。每次提交都可能开始一次付费运行;如果提交结果未知,请勿自动重试。
1 获取 API 密钥 ↗
What you need
- Runs on
- Comfy Cloud
- 密钥
- COMFY_API_KEY
- 你的文件
- 由代码根据链接上传
需要付费的 Cloud 方案和额度。
# 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": "LoadImage",
"inputs": {
"image": "UPLOADED_image_FILENAME"
},
"_meta": {
"title": "Load Product Image"
}
},
"5": {
"class_type": "MinimaxHailuoVideoNode",
"inputs": {
"duration": 6,
"first_frame_image": [
"10",
0
],
"prompt_optimizer": True,
"prompt_text": "Product video — a 360° rotating hero showcase of the exact product in the input image, with a cinematic soft spotlight, minimal studio background, and seamless loop. Preserve the product’s shape, proportions, materials, colors, markings, and existing logo throughout the shot.",
"resolution": "1080P",
"seed": 111
},
"_meta": {
"title": "360 Rotation Vid - MiniMax Hailuo Video"
}
},
"9": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI",
"images": [
"10",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"10": {
"class_type": "ByteDanceSeedreamNode",
"inputs": {
"fail_on_partial": True,
"height": 2048,
"image": [
"1",
0
],
"max_images": 1,
"model": "seedream-4-5-251128",
"prompt": "Professional studio product photography of the exact product shown in image 1, positioned at a dynamic three-quarter angle. Preserve its shape, proportions, materials, colors, markings, and existing logo; do not add or replace branding. The lighting is dramatic and cool-toned, featuring a hard spotlight that creates a glowing halo effect on the ground while casting soft shadows. The background is a seamless, clean gradient transitioning from a light silver-gray top to a deep anthracite black floor. Minimal composition with generous negative space, shot with shallow depth of field (f/2.8) to emphasize product details while softly blurring the background.",
"seed": 555,
"sequential_image_generation": "disabled",
"size_preset": "1664x2496 (2:3)",
"watermark": False,
"width": 2048
},
"_meta": {
"title": "ByteDance Seedream 4.5 & 5.0"
}
},
"16": {
"class_type": "SaveVideo",
"inputs": {
"filename_prefix": "video/ComfyUI-1",
"format": "auto",
"format.codec": "auto",
"video": [
"5",
0
]
},
"_meta": {
"title": "Save Video"
}
},
"17": {
"class_type": "SaveVideo",
"inputs": {
"filename_prefix": "video/ComfyUI-2",
"format": "auto",
"format.codec": "auto",
"video": [
"18",
0
]
},
"_meta": {
"title": "Save Video"
}
},
"18": {
"class_type": "MinimaxHailuoVideoNode",
"inputs": {
"duration": 6,
"first_frame_image": [
"10",
0
],
"prompt_optimizer": True,
"prompt_text": "Product video — the camera slowly zooms toward the exact product in the input image, revealing its material and texture details with cinematic shallow depth of field. Preserve the product’s shape, proportions, materials, colors, markings, and existing logo throughout the shot.",
"resolution": "1080P",
"seed": 222
},
"_meta": {
"title": "Detailed Texture Vid - MiniMax Hailuo Video"
}
},
"19": {
"class_type": "SaveVideo",
"inputs": {
"filename_prefix": "video/ComfyUI-2",
"format": "auto",
"format.codec": "auto",
"video": [
"20",
0
]
},
"_meta": {
"title": "Save Video"
}
},
"20": {
"class_type": "MinimaxHailuoVideoNode",
"inputs": {
"duration": 6,
"first_frame_image": [
"10",
0
],
"prompt_optimizer": True,
"prompt_text": "Product video — the camera pans across the exact product in the input image from one end to the other. Dramatic cinematic light sweeps across it and dust motes float in the air. Preserve the product’s shape, proportions, materials, colors, markings, and existing logo throughout the shot.",
"resolution": "1080P",
"seed": 333
},
"_meta": {
"title": "Cinematic Pan Vid - MiniMax Hailuo Video"
}
},
"27": {
"class_type": "ConcatenateVideo",
"inputs": {
"codec": "auto",
"videos.video0": [
"5",
0
],
"videos.video1": [
"18",
0
],
"videos.video2": [
"20",
0
]
},
"_meta": {
"title": "Concatenate Video"
}
},
"30": {
"class_type": "SaveVideo",
"inputs": {
"filename_prefix": "video/ComfyUI",
"format": "auto",
"format.codec": "auto",
"video": [
"27",
0
]
},
"_meta": {
"title": "Save Video"
}
}
})
workflow.set_input("1", "image", client.assets.from_url("https://cdn.jsdelivr.net/gh/Comfy-Org/workflow_templates@90c71fb78b3726392d010ff62a8e79e92d7296ad/input/product_shoe.jpeg"))
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)
for output in job.get_outputs("30"):
output.to_file(output.name)
for output in job.get_outputs("16"):
output.to_file(output.name)
for output in job.get_outputs("17"):
output.to_file(output.name)
for output in job.get_outputs("19"):
output.to_file(output.name)