Перенос стиля Vid2Vid — GPT Image 2 + Seedance 2.0
Создайте до 4 генераций style transfer видео в видео с использованием моделей уровня state of the art. Этот рабочий процесс создаёт depth map из вашего входного видео, чтобы направлять генерацию Seedance 2.0. Первый кадр видео извлекается и используется как референс вместе с вашими style промптами через GPT-Image-2.
О проекте
Этот video-to-video рабочий процесс с учётом глубины и референса применяет согласованный style transfer к вашему видео, сохраняя движение и геометрию сцены. Он начинается с загрузки клипа через LoadVideo, затем вычисляет depth map для каждого кадра, чтобы заякорить структуру и движение камеры (это делает пользовательская нода обработки c3b10638-32f0-4101-9b21-21fcda8712d8). Самый первый кадр извлекается и сохраняется (через SaveImage и вспомогательные утилиты вроде 8dbec705-cae4-4197-9594-85b48cc18483), а затем передаётся в OpenAIGPTImageNodeV2 вместе с вашим текстовым промптом из PrimitiveStringMultiline. GPT-Image-2 генерирует стилизованное референсное изображение на основе первого кадра, и рабочий процесс использует его, чтобы направлять общий вид.
Основная стилизация выполняется Seedance 2.0 через ByteDance2ReferenceNode, который объединяет три сигнала: depth map (структура), стилевой референс из первого кадра (внешний вид) и ваш промпт (семантическое направление). Вы можете поставить в очередь до четырёх вариаций стиля за один запуск, используя пакетные ноды fan-out/collector (a3edb32a-4533-45e3-8eb2-84399225da2e), а затем собрать сгенерированные кадры в финальные видео через CreateVideo и SaveVideo. На выходе — набор стабильных клипов в выбранном стиле, которые сохраняют исходный тайминг и движение, но отражают заданную эстетику.
Что вы предоставляете
- Чтение рабочего процесса
Работает в 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({
"5001": {
"class_type": "LoadVideo",
"inputs": {
"file": "4d3c0f63a57ce34ca0b50ac4800b8000c60773c7c135779fb153ff7b3e54980d.mp4"
},
"_meta": {
"title": "Load Video"
}
},
"5312": {
"class_type": "CreateVideo",
"inputs": {
"bit_depth": "auto",
"codec": "none",
"color_space": "sRGB",
"fps": 24,
"images": [
"5337:5326",
0
]
},
"_meta": {
"title": "Create Video"
}
},
"5313": {
"class_type": "SaveVideo",
"inputs": {
"codec": "auto",
"filename_prefix": "2x2_stack_final",
"format": "auto",
"format.codec": "auto",
"video": [
"5312",
0
]
},
"_meta": {
"title": "Save Video"
}
},
"5340": {
"class_type": "ByteDance2ReferenceNode",
"inputs": {
"model": "Seedance 2.0",
"model.auto_downscale": False,
"model.auto_upscale": False,
"model.duration": 6,
"model.generate_audio": True,
"model.prompt": [
"5391:5394",
0
],
"model.ratio": "adaptive",
"model.reference_images.image_1": [
"5346",
0
],
"model.reference_videos.video_1": [
"5405:5359",
0
],
"model.resolution": "480p",
"seed": 111,
"watermark": False
},
"_meta": {
"title": "ByteDance Seedance 2.5 Reference to Video (Legacy)"
}
},
"5341": {
"class_type": "SaveVideo",
"inputs": {
"codec": "auto",
"filename_prefix": "2x2_stack_1_video",
"format": "auto",
"format.codec": "auto",
"video": [
"5340",
0
]
},
"_meta": {
"title": "Save Video"
}
},
"5346": {
"class_type": "OpenAIGPTImageNodeV2",
"inputs": {
"model": "gpt-image-2",
"model.background": "auto",
"model.custom_height": 1024,
"model.custom_width": 1024,
"model.images.image_1": [
"5405:5406",
0
],
"model.quality": "medium",
"model.size": "auto",
"n": 1,
"prompt": [
"5391:5384",
0
],
"seed": 111
},
"_meta": {
"title": "OpenAI GPT Image 2.5"
}
},
"5347": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "2x2_stack_2_image",
"images": [
"5362",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"5349": {
"class_type": "ByteDance2ReferenceNode",
"inputs": {
"model": "Seedance 2.0",
"model.auto_downscale": False,
"model.auto_upscale": False,
"model.duration": 6,
"model.generate_audio": True,
"model.prompt": [
"5391:5395",
0
],
"model.ratio": "adaptive",
"model.reference_images.image_1": [
"5362",
0
],
"model.reference_videos.video_1": [
"5405:5359",
0
],
"model.resolution": "480p",
"seed": 22,
"watermark": False
},
"_meta": {
"title": "ByteDance Seedance 2.5 Reference to Video (Legacy)"
}
},
"5350": {
"class_type": "SaveVideo",
"inputs": {
"codec": "auto",
"filename_prefix": "2x2_stack_2_video",
"format": "auto",
"format.codec": "auto",
"video": [
"5349",
0
]
},
"_meta": {
"title": "Save Video"
}
},
"5351": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "2x2_stack_3_image",
"images": [
"5363",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"5353": {
"class_type": "ByteDance2ReferenceNode",
"inputs": {
"model": "Seedance 2.0",
"model.auto_downscale": False,
"model.auto_upscale": False,
"model.duration": 6,
"model.generate_audio": True,
"model.prompt": [
"5391:5396",
0
],
"model.ratio": "adaptive",
"model.reference_images.image_1": [
"5363",
0
],
"model.reference_videos.video_1": [
"5405:5359",
0
],
"model.resolution": "480p",
"seed": 333,
"watermark": False
},
"_meta": {
"title": "ByteDance Seedance 2.5 Reference to Video (Legacy)"
}
},
"5354": {
"class_type": "SaveVideo",
"inputs": {
"codec": "auto",
"filename_prefix": "2x2_stack_3_video",
"format": "auto",
"format.codec": "auto",
"video": [
"5353",
0
]
},
"_meta": {
"title": "Save Video"
}
},
"5355": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "2x2_stack_4_image",
"images": [
"5364",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"5357": {
"class_type": "ByteDance2ReferenceNode",
"inputs": {
"model": "Seedance 2.0",
"model.auto_downscale": False,
"model.auto_upscale": False,
"model.duration": 6,
"model.generate_audio": True,
"model.prompt": [
"5391:5397",
0
],
"model.ratio": "adaptive",
"model.reference_images.image_1": [
"5364",
0
],
"model.reference_videos.video_1": [
"5405:5359",
0
],
"model.resolution": "480p",
"seed": 4,
"watermark": False
},
"_meta": {
"title": "ByteDance Seedance 2.5 Reference to Video (Legacy)"
}
},
"5358": {
"class_type": "SaveVideo",
"inputs": {
"codec": "auto",
"filename_prefix": "2x2_stack_4_video",
"format": "auto",
"format.codec": "auto",
"video": [
"5357",
0
]
},
"_meta": {
"title": "Save Video"
}
},
"5360": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "2x2_stack_1_image",
"images": [
"5346",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"5362": {
"class_type": "OpenAIGPTImageNodeV2",
"inputs": {
"model": "gpt-image-2",
"model.background": "auto",
"model.custom_height": 1024,
"model.custom_width": 1024,
"model.images.image_1": [
"5405:5406",
0
],
"model.quality": "medium",
"model.size": "auto",
"n": 1,
"prompt": [
"5391:5386",
0
],
"seed": 222
},
"_meta": {
"title": "OpenAI GPT Image 2.5"
}
},
"5363": {
"class_type": "OpenAIGPTImageNodeV2",
"inputs": {
"model": "gpt-image-2",
"model.background": "auto",
"model.custom_height": 1024,
"model.custom_width": 1024,
"model.images.image_1": [
"5405:5406",
0
],
"model.quality": "medium",
"model.size": "auto",
"n": 1,
"prompt": [
"5391:5388",
0
],
"seed": 333
},
"_meta": {
"title": "OpenAI GPT Image 2.5"
}
},
"5364": {
"class_type": "OpenAIGPTImageNodeV2",
"inputs": {
"model": "gpt-image-2",
"model.background": "auto",
"model.custom_height": 1024,
"model.custom_width": 1024,
"model.images.image_1": [
"5405:5406",
0
],
"model.quality": "medium",
"model.size": "auto",
"n": 1,
"prompt": [
"5391:5390",
0
],
"seed": 444
},
"_meta": {
"title": "OpenAI GPT Image 2.5"
}
},
"5401": {
"class_type": "PrimitiveStringMultiline",
"inputs": {
"value": "apply a post-apocalyptic orange and teal desert grade"
},
"_meta": {
"title": "Prompt - Style 1"
}
},
"5402": {
"class_type": "PrimitiveStringMultiline",
"inputs": {
"value": "apply a surreal dreamlike bloom grade with glowing highlights, soft halation around light sources, lifted blacks, and a hazy ethereal pastel wash across the midtones"
},
"_meta": {
"title": "Prompt - Style 2"
}
},
"5403": {
"class_type": "PrimitiveStringMultiline",
"inputs": {
"value": "apply a olive and amber grade with deep shadows"
},
"_meta": {
"title": "Prompt - Style 3"
}
},
"5404": {
"class_type": "PrimitiveStringMultiline",
"inputs": {
"value": "apply a symmetrical pastel grade with mustard yellows and dusty pinks"
},
"_meta": {
"title": "Prompt - Style 4"
}
},
"5337:5326": {
"class_type": "ImageStitch",
"inputs": {
"direction": "down",
"image1": [
"5337:5327",
0
],
"image2": [
"5337:5334",
0
],
"match_image_size": True,
"spacing_color": "white",
"spacing_width": 0
},
"_meta": {
"title": "Stitch Images"
}
},
"5337:5327": {
"class_type": "ImageStitch",
"inputs": {
"direction": "right",
"image1": [
"5337:5330",
0
],
"image2": [
"5337:5328",
0
],
"match_image_size": True,
"spacing_color": "white",
"spacing_width": 0
},
"_meta": {
"title": "Stitch Images"
}
},
"5337:5328": {
"class_type": "GetVideoComponents",
"inputs": {
"video": [
"5349",
0
]
},
"_meta": {
"title": "Get Video Components"
}
},
"5337:5330": {
"class_type": "GetVideoComponents",
"inputs": {
"video": [
"5340",
0
]
},
"_meta": {
"title": "Get Video Components"
}
},
"5337:5332": {
"class_type": "GetVideoComponents",
"inputs": {
"video": [
"5353",
0
]
},
"_meta": {
"title": "Get Video Components"
}
},
"5337:5334": {
"class_type": "ImageStitch",
"inputs": {
"direction": "right",
"image1": [
"5337:5332",
0
],
"image2": [
"5337:5335",
0
],
"match_image_size": True,
"spacing_color": "white",
"spacing_width": 0
},
"_meta": {
"title": "Stitch Images"
}
},
"5337:5335": {
"class_type": "GetVideoComponents",
"inputs": {
"video": [
"5357",
0
]
},
"_meta": {
"title": "Get Video Components"
}
},
"5391:5384": {
"class_type": "StringConcatenate",
"inputs": {
"delimiter": " ",
"string_a": "Change the style of @image_1 to",
"string_b": [
"5401",
0
]
},
"_meta": {
"title": "Concatenate Text"
}
},
"5391:5386": {
"class_type": "StringConcatenate",
"inputs": {
"delimiter": " ",
"string_a": "Change the style of @image_1 to",
"string_b": [
"5402",
0
]
},
"_meta": {
"title": "Concatenate Text"
}
},
"5391:5388": {
"class_type": "StringConcatenate",
"inputs": {
"delimiter": " ",
"string_a": "Change the style of @image_1 to",
"string_b": [
"5403",
0
]
},
"_meta": {
"title": "Concatenate Text"
}
},
"5391:5390": {
"class_type": "StringConcatenate",
"inputs": {
"delimiter": " ",
"string_a": "Change the style of @image_1 to",
"string_b": [
"5404",
0
]
},
"_meta": {
"title": "Concatenate Text"
}
},
"5391:5394": {
"class_type": "StringConcatenate",
"inputs": {
"delimiter": " ",
"string_a": "Use @image_1 from the reference images as a start frame and visual style. Use the motion from the depth map from @video_1. Ensure that the style of the video is",
"string_b": [
"5401",
0
]
},
"_meta": {
"title": "Concatenate Text"
}
},
"5391:5395": {
"class_type": "StringConcatenate",
"inputs": {
"delimiter": " ",
"string_a": "Use @image_1 from the reference images as a start frame and visual style. Use the motion from the depth map from @video_1. Ensure that the style of the video is",
"string_b": [
"5402",
0
]
},
"_meta": {
"title": "Concatenate Text"
}
},
"5391:5396": {
"class_type": "StringConcatenate",
"inputs": {
"delimiter": " ",
"string_a": "Use @image_1 from the reference images as a start frame and visual style. Use the motion from the depth map from @video_1. Ensure that the style of the video is",
"string_b": [
"5403",
0
]
},
"_meta": {
"title": "Concatenate Text"
}
},
"5391:5397": {
"class_type": "StringConcatenate",
"inputs": {
"delimiter": " ",
"string_a": "Use @image_1 from the reference images as a start frame and visual style. Use the motion from the depth map from @video_1. Ensure that the style of the video is",
"string_b": [
"5404",
0
]
},
"_meta": {
"title": "Concatenate Text"
}
},
"5405:5342": {
"class_type": "DepthAnything_V3",
"inputs": {
"da3_model": [
"5405:5343",
0
],
"images": [
"5405:5344",
0
],
"invert_depth": False,
"keep_model_size": False,
"normalization_mode": "V2-Style",
"resize_method": "resize"
},
"_meta": {
"title": "Depth Anything V3"
}
},
"5405:5343": {
"class_type": "DownloadAndLoadDepthAnythingV3Model",
"inputs": {
"attention": "auto",
"model": "da3_large.safetensors",
"precision": "auto"
},
"_meta": {
"title": "Load Depth Anything V3 Model"
}
},
"5405:5344": {
"class_type": "GetVideoComponents",
"inputs": {
"video": [
"5001",
0
]
},
"_meta": {
"title": "Get Video Components"
}
},
"5405:5359": {
"class_type": "CreateVideo",
"inputs": {
"audio": [
"5405:5344",
1
],
"bit_depth": "auto",
"codec": "none",
"color_space": "sRGB",
"fps": [
"5405:5344",
2
],
"images": [
"5405:5342",
0
]
},
"_meta": {
"title": "Create Video"
}
},
"5405:5406": {
"class_type": "ImageFromBatch",
"inputs": {
"batch_index": 0,
"image": [
"5405:5344",
0
],
"length": 1
},
"_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)Вопросы и ответы
Он считает depth map для каждого кадра входного видео, чтобы сохранить структуру сцены, затем использует ByteDance2ReferenceNode (Seedance 2.0), чтобы смешать эту структуру со стилевым референсом, созданным из первого кадра через GPT-Image-2. Увеличение параметров depth/consistency (если доступны) обычно снижает мерцание и деформации.
Да. OpenAIGPTImageNodeV2 вызывает GPT-Image-2, чтобы создать стилевой референс из первого кадра. Добавьте API‑ключ в Настройки этой ноды и настройте доступные параметры, чтобы контролировать выход референса.
Да. Введите до четырёх промптов (по одному в строке) в PrimitiveStringMultiline. Пакетные ноды (a3edb32a-4533-45e3-8eb2-84399225da2e) разветвляют входы, чтобы пайплайн сделал до четырёх видео за один запуск.
Попробуйте увеличить влияние depth или temporal consistency в ByteDance2ReferenceNode, уменьшить strength стиля и использовать фиксированный seed. Также убедитесь, что входной fps и разрешение разумны для вашей GPU: слишком высокие значения могут приводить к нестабильности.
Нет. SaveVideo сохраняет «немые» видеофайлы. Если нужно аудио, экспортируйте его из исходного клипа и примиксуйте к стилизованному выходу в видеоредакторе.