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
コードからこのモデルを呼び出す
以下のリクエストでは、Playground と同じ準備済みグラフと設定を使用します。送信ごとに有料実行が開始される場合があります。結果が不明な送信を自動的に再試行しないでください。
1 API キーを取得 ↗
What you need
- Runs on
- Comfy Cloud
- キー
- COMFY_API_KEY
- ファイル
- コードによって URL からアップロードされます
有料の 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)