Change a video’s background
Describe a new setting for your footage while keeping its subject and movement.
워크플로 다운로드Cloud에서 사용해 보기 API 문서
00:00
워크플로 내부
소스 템플릿의 읽기 전용 미리보기입니다. Cloud에서 열어 노드를 살펴보고 변경할 수 있습니다.
Loading the graph
Open full-size workflow preview실행 환경
- 작성자
- ComfyUI
코드에서 이 모델 호출하기
아래 요청은 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({
"16": {
"class_type": "SaveVideo",
"inputs": {
"filename_prefix": "video/Seedance2.5_video_edit",
"format": "auto",
"format.codec": "auto",
"video": [
"39",
0
]
},
"_meta": {
"title": "Save Video"
}
},
"35": {
"class_type": "LoadVideo",
"inputs": {
"file": "UPLOADED_video_FILENAME"
},
"_meta": {
"title": "Load Video"
}
},
"36": {
"class_type": "Video Slice",
"inputs": {
"duration": 5,
"start_time": 0,
"strict_duration": False,
"video": [
"35",
0
]
},
"_meta": {
"title": "Trim Video"
}
},
"39": {
"class_type": "ByteDance2ReferenceNodeV2",
"inputs": {
"model": "Seedance 2.5",
"model.auto_downscale": True,
"model.auto_upscale": False,
"model.duration": 5,
"model.generate_audio": True,
"model.output_format": "mp4",
"model.prompt": [
"workshop-prompt",
0
],
"model.ratio": "16:9",
"model.reference_videos.video_1": [
"36",
0
],
"model.resolution": "720p",
"model.task_type": "edit",
"seed": 0,
"watermark": False
},
"_meta": {
"title": "ByteDance Seedance 2.5 Reference to Video"
}
},
"workshop-prompt": {
"class_type": "StringConcatenate",
"inputs": {
"delimiter": " ",
"string_a": "Replace the background with a sunlit city park, leafy trees, and a soft blue sky. Preserve the subject, its clothing, movement, camera framing, and timing. Change only the background and match its lighting to the subject.",
"string_b": "Use this as the new background of the video. Keep the subject, its clothing, pose, movement, camera framing and timing exactly as in the source video. Change only the background, and match the new background's lighting to the subject."
},
"_meta": {
"title": "Workshop prompt + fixed instructions"
}
}
})
workflow.set_input("35", "file", client.assets.from_url("https://cdn.jsdelivr.net/gh/Comfy-Org/workflow_templates@90c71fb78b3726392d010ff62a8e79e92d7296ad/input/kitten_cop.mp4"))
# 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("16"):
output.to_file(output.name)예시 사용해 보기
관련 워크플로
- 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-롤 제작
- Seedance 2.0
Depth Motion Capture with Seedance 2.0