4K Seedance 2.0 - 參考圖像轉影片
從參考圖像與文字提示生成 4K 電影級影片。保留主體身份與構圖,並以同步音訊加入豐富動態。可透過詳細提示詞控制鏡頭運動與燈光。
下載工作流程在 Cloud 中試用 API 文件
00:00
工作流程內部
來源範本的唯讀預覽。請在 Cloud 中開啟,以探索節點並進行變更。
Loading the graph
Open full-size workflow preview- 輸出
- 影片
- 作者
- Purz
從您的程式碼呼叫此模型
以下請求使用與 Playground 相同的已準備節點圖和設定。每次提交都可能啟動付費執行;若提交結果不明,請勿自動重試提交。
1 取得 API 金鑰 ↗
What you need
- Runs on
- Comfy Cloud
- 金鑰
- COMFY_API_KEY
- 您的檔案
- 由程式碼透過其 URL 上傳
需要付費 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({
"344": {
"class_type": "SaveVideo",
"inputs": {
"filename_prefix": "video/Seedance2.0_r2v",
"format": "auto",
"format.codec": "auto",
"video": [
"360",
0
]
},
"_meta": {
"title": "Save Video"
}
},
"352": {
"class_type": "LoadImage",
"inputs": {
"image": "UPLOADED_image_2_FILENAME"
},
"_meta": {
"title": "Load Image"
}
},
"353": {
"class_type": "LoadImage",
"inputs": {
"image": "UPLOADED_image_3_FILENAME"
},
"_meta": {
"title": "Load Image"
}
},
"354": {
"class_type": "LoadImage",
"inputs": {
"image": "UPLOADED_image_4_FILENAME"
},
"_meta": {
"title": "Load Image"
}
},
"356": {
"class_type": "LoadImage",
"inputs": {
"image": "UPLOADED_image_1_FILENAME"
},
"_meta": {
"title": "Load Image"
}
},
"360": {
"class_type": "ByteDance2ReferenceNode",
"inputs": {
"model": "Seedance 2.0",
"model.auto_downscale": True,
"model.auto_upscale": False,
"model.duration": 7,
"model.generate_audio": True,
"model.prompt": "Fast-paced fashion showcase filmed as a first-person selfie with a wide-angle lens. The woman from the first reference image holds the camera at arm's length on a windswept coastal bluff at dawn, talking to the lens and laughing as sea mist blows past. [0-2s] She wears the light henley top from the third reference with the wide-leg trousers from the fourth, steps back and turns so both are fully visible. [2-4s] Glitch transition: she now wears the slate-blue utility jacket from the second reference over the same henley, tugging the collar and leaning close to the camera. [4-7s] Glitch transition: she twirls in the full look, jacket open, trousers flaring, then waves goodbye. Garments match their references exactly, consistent in every frame. Quick whip-pans, heather and cliffs behind her, wind, waves and an upbeat electronic beat.",
"model.ratio": "16:9",
"model.reference_images.image_1": [
"356",
0
],
"model.reference_images.image_2": [
"352",
0
],
"model.reference_images.image_3": [
"353",
0
],
"model.reference_images.image_4": [
"354",
0
],
"model.resolution": "4k",
"seed": 838593524,
"watermark": False
},
"_meta": {
"title": "ByteDance Seedance 2.5 Reference to Video (Legacy)"
}
}
})
workflow.set_input("356", "image", client.assets.from_url("https://comfy.org/catalog-media/df5a1664-68f6-4c3c-8b34-02895d86db16/54a073ef-1f26-4eec-b764-94bfd82eed0b"))
workflow.set_input("352", "image", client.assets.from_url("https://comfy.org/catalog-media/7d8b9701-bf08-4fb7-a7df-47f64b430460/a25eac7f-d83f-437d-8035-cb999f16c66f"))
workflow.set_input("353", "image", client.assets.from_url("https://comfy.org/catalog-media/8119a491-8843-40ea-8c25-f777b5191fef/0383b1d3-632a-414d-933a-8b67b5f3314e"))
workflow.set_input("354", "image", client.assets.from_url("https://comfy.org/catalog-media/1ab3d685-99d1-4974-8f60-da41339a13fa/21931d99-5c1f-48b2-9b2e-2c8a6a02d53b"))
# 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("344"):
output.to_file(output.name)試試範例
關於此工作流程
Generate cinematic videos from reference images and text prompts in 4K. Preserve subject identity and composition while adding expressive motion with synchronized audio. Control camera movement and lighting through detailed prompts.