4K Seedance 2.0 - Reference to Video
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.
下载工作流在 Cloud 中试用 API 文档
00:00
查看工作流内部
源模板的只读预览。在 Cloud 中打开,即可查看节点并进行修改。
Loading the graph
Open full-size workflow preview- 输出
- 视频
- 作者
- Purz
从代码中调用该模型
以下请求使用与体验区相同的预设图和设置。每次提交都可能开始一次付费运行;如果提交结果未知,请勿自动重试。
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({
"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.