Seedance 2.0 - 影片延伸
用 Seedance 2.0 無縫延伸輸入影片。輸入描述延續內容的提示,流程自動偵測最無縫的起始影格,並可從該影格裁切延伸段。
關於
Seedance 2.0 - 影片延伸是 ComfyUI 工作流程,可將輸入影片自動延續,生成後續影格並裁切至最無縫的銜接點。流程用 LoadVideo 與 GetVideoComponents 載入來源影片,提取影格、FPS 與音訊,並將延續內容描述(提示)送入 Seedance 2.0 生成器(ByteDance2ReferenceNode)。提示描述影片最後一格後發生的內容,模型據此生成新影格。PrimitiveStringMultiline 與 StringConcatenate 組合最終提示文字。
由於模型生成的延續段不會與原片最後一格完全一致,流程內建自動剪接點輔助。Preview Images Difference 節點(f1f7c973-e50b-4ec7-84c5-0ef2eef1fc84)比較每個生成影格與原片最後一格的色差,最暗的預覽即為視覺最接近的影格。您可選擇該索引,並用 ImageFromBatch+ 從該影格裁切延伸段,最後用 BatchImagesNode 串接原片與延伸段。CreateVideo 以原始 FPS 重組影片,AudioConcat 保留或拼接音訊,SaveVideo 匯出最終延伸影片。流程內含 PreviewImage 節點,方便快速檢查原片最後一格與候選影格。
您提供的內容
- 正在讀取工作流程
在 ComfyUI 中執行。 此工作流程無法在此頁面上執行。請在已載入所有內容的 Comfy Cloud 中開啟,或下載到您自己的 ComfyUI。
在 Cloud 中試用工作流程內部
節點圖的唯讀預覽。請在 Comfy Cloud 中開啟,或下載後編輯節點。
Loading the graph
Open full-size workflow preview- 作者
- Rob
需要自訂節點
- 正在讀取工作流程
從程式碼使用此工作流程
可行時會根據工作流程圖和輸入內容產生;否則會顯示儲存的範例。執行可能產生費用的程式碼前,請檢查認證資訊和端點。
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": "ByteDance2ReferenceNode",
"inputs": {
"model": "Seedance 2.0",
"model.auto_downscale": False,
"model.auto_upscale": False,
"model.duration": 7,
"model.generate_audio": True,
"model.prompt": [
"119",
0
],
"model.ratio": "adaptive",
"model.reference_videos.video_1": [
"3",
0
],
"model.resolution": "720p",
"seed": 1111111,
"watermark": False
},
"_meta": {
"title": "ByteDance Seedance 2.5 Reference to Video (Legacy)"
}
},
"3": {
"class_type": "LoadVideo",
"inputs": {
"file": "ea6b81bf8e18ceb6ea79e5f08e6ed35271ae6dfb9df1ce88e7a9eda78189445e.mp4"
},
"_meta": {
"title": "Load Video"
}
},
"4": {
"class_type": "GetVideoComponents",
"inputs": {
"video": [
"1",
0
]
},
"_meta": {
"title": "Get Video Components"
}
},
"5": {
"class_type": "GetVideoComponents",
"inputs": {
"video": [
"3",
0
]
},
"_meta": {
"title": "Get Video Components"
}
},
"6": {
"class_type": "BatchImagesNode",
"inputs": {
"images.image0": [
"5",
0
],
"images.image1": [
"114",
0
]
},
"_meta": {
"title": "Batch Images"
}
},
"7": {
"class_type": "CreateVideo",
"inputs": {
"audio": [
"8",
0
],
"bit_depth": "auto",
"codec": "none",
"color_space": "sRGB",
"fps": [
"4",
2
],
"images": [
"6",
0
]
},
"_meta": {
"title": "Create Stitched Video"
}
},
"8": {
"class_type": "AudioConcat",
"inputs": {
"audio1": [
"5",
1
],
"audio2": [
"4",
1
],
"direction": "after"
},
"_meta": {
"title": "Concatenate Audio"
}
},
"9": {
"class_type": "SaveVideo",
"inputs": {
"codec": "auto",
"filename_prefix": "stitched_video",
"format": "auto",
"format.codec": "auto",
"video": [
"7",
0
]
},
"_meta": {
"title": "Save Stitched Video"
}
},
"10": {
"class_type": "SaveVideo",
"inputs": {
"codec": "auto",
"filename_prefix": "extended_video",
"format": "auto",
"format.codec": "auto",
"video": [
"11",
0
]
},
"_meta": {
"title": "Save Extended Video"
}
},
"11": {
"class_type": "CreateVideo",
"inputs": {
"audio": [
"4",
1
],
"bit_depth": "auto",
"codec": "none",
"color_space": "sRGB",
"fps": [
"4",
2
],
"images": [
"4",
0
]
},
"_meta": {
"title": "Create Extended Video"
}
},
"113": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"111:108",
0
]
},
"_meta": {
"title": "Preview Images Difference"
}
},
"114": {
"class_type": "ImageFromBatch+",
"inputs": {
"image": [
"4",
0
],
"length": -1,
"start": 0
},
"_meta": {
"title": "Trim Extended Video"
}
},
"118": {
"class_type": "PrimitiveStringMultiline",
"inputs": {
"value": "Camera pulls back to reveal twin fiery swords crossed at chest height, eyes flaring hotter, cloak settling. Camera locks into a low hero-shot medium, blade flames licking the frame edges."
},
"_meta": {
"title": "Prompt - Video Extension"
}
},
"119": {
"class_type": "StringConcatenate",
"inputs": {
"delimiter": " ",
"string_a": "Extend from the end of @video_1. ",
"string_b": [
"118",
0
]
},
"_meta": {
"title": "Create Prompt"
}
},
"111:106": {
"class_type": "ReverseImageBatch",
"inputs": {
"images": [
"5",
0
]
},
"_meta": {
"title": "Reverse Image Batch"
}
},
"111:107": {
"class_type": "ImageFromBatch",
"inputs": {
"batch_index": 0,
"image": [
"111:106",
0
],
"length": 1
},
"_meta": {
"title": "Get Image from Batch"
}
},
"111:108": {
"class_type": "ImageEnhanceDifference+",
"inputs": {
"exponent": 0.75,
"image1": [
"111:107",
0
],
"image2": [
"111:112",
0
]
},
"_meta": {
"title": "Image Enhance Difference"
}
},
"111:112": {
"class_type": "ImageFromBatch",
"inputs": {
"batch_index": 0,
"image": [
"4",
0
],
"length": 12
},
"_meta": {
"title": "Get Image from Batch"
}
}
})
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)問答
用 Preview Images Difference 節點比較每個生成影格與原片最後一格,最暗的預覽即色差最小。於 ImageFromBatch+ 設定該索引,延伸段即從此影格開始。
請在提示中明確描述延續內容(如光線、動作方向、主體姿勢、背景),並保持風格與原片一致。建議多生成幾格,再用色差預覽裁切最佳起點。
GetVideoComponents 會提取原始音訊,AudioConcat 可拼接至延伸段。由於生成影格不含新音訊,通常僅保留原音至剪接點,或於後製加入新音訊。
取決於硬體與 ByteDance2ReferenceNode 設定(如生成影格數)。延伸越長,品質與連貫性會逐漸下降,建議適度延伸並挑選最佳裁切點。
相關工作流程
- Seedance 2.5
Change a video’s background
- LTX-2.3
Remove an object from a video
- LTX-2.3
Expand a video’s frame
- SSCAIL-2
Replace a character in a video
- SSeedVR2
Upscale a video
- LTX-2.3
Restore archival footage
- 合作夥伴節點
AI on the Lot 2026_LTX-2.3_IC LoRA(Union Control)
- Wan2.2, Z-Image-Turbo
AIrt MAchIne
- 合合作夥伴節點
Beeble SwitchX:影片編輯
- BRIA
Bria:去除影片背景
- CCapybara
Capybara:影片編輯
- 合合作夥伴節點
Comfy 廣告用 B-Roll 片段製作