Style Transfer Vid2Vid - GPT Image 2 + Seedance 2.0
Crie até 4 gerações de transferência de estilo vídeo para vídeo usando modelos de última geração. Este fluxo cria um mapa de profundidade do seu vídeo de entrada para guiar a geração do Seedance 2.0. O primeiro quadro do vídeo é extraído e usado como referência junto com seus prompts de estilo usando o GPT-Image-2.
Sobre
Este fluxo de trabalho vídeo-para-vídeo, guiado por profundidade e referência, aplica transferência de estilo consistente ao seu vídeo preservando movimento e geometria da cena. Começa com a ingestão do vídeo pelo LoadVideo, depois calcula um mapa de profundidade por quadro para ancorar estrutura e movimento de câmera (feito pelo nó customizado c3b10638-32f0-4101-9b21-21fcda8712d8). O primeiro quadro é extraído e salvo (via SaveImage e utilitários como 8dbec705-cae4-4197-9594-85b48cc18483), depois passado ao OpenAIGPTImageNodeV2 junto com seu prompt de texto do PrimitiveStringMultiline. O GPT-Image-2 gera uma imagem de referência estilizada a partir desse quadro inicial, que o fluxo usa para guiar o visual geral.
A estilização principal é feita pelo Seedance 2.0 via ByteDance2ReferenceNode, que funde três sinais: o mapa de profundidade (estrutura), a referência de estilo do primeiro quadro (aparência) e seu prompt (orientação semântica). É possível enfileirar até quatro variações de estilo em uma execução usando os nós de fan-out/collector em lote (a3edb32a-4533-45e3-8eb2-84399225da2e), depois remontar os quadros gerados em vídeos finais com CreateVideo e SaveVideo. O resultado é um conjunto de clipes estáveis e estilizados que mantêm o tempo e movimento originais, refletindo a estética escolhida.
O que você fornece
- Lendo o fluxo de trabalho
É executado no ComfyUI. Este fluxo de trabalho não pode ser executado nesta página. Abra-o no Comfy Cloud com tudo carregado ou baixe-o para usar no seu próprio ComfyUI.
Experimentar no CloudDentro do workflow
Uma prévia somente leitura do gráfico de nós. Abra-o no Comfy Cloud ou faça o download para editar os nós.
Loading the graph
Open full-size workflow preview- Autor
- Rob
Requer nós personalizados
- Lendo o fluxo de trabalho
Use este fluxo de trabalho a partir do código
Gerado a partir do grafo e das entradas do fluxo de trabalho quando possível; caso contrário, são exibidos exemplos armazenados. Revise as credenciais e os endpoints antes de executar o código, pois isso pode gerar cobranças.
What you need
- Runs on
- Comfy Cloud
- Chave
- COMFY_API_KEY
Requer um plano pago do Cloud e créditos.
# 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)Perguntas e respostas
Ele calcula um mapa de profundidade por quadro do vídeo de entrada para preservar a estrutura da cena, depois usa o ByteDance2ReferenceNode (Seedance 2.0) para mesclar essa estrutura com uma referência de estilo criada do primeiro quadro pelo GPT-Image-2. Aumentar as configurações de profundidade/consistência (se disponíveis) normalmente reduz flicker e distorções.
Sim. O OpenAIGPTImageNodeV2 chama o GPT-Image-2 para criar uma referência estilizada do primeiro quadro. Adicione sua chave de API nas configurações do nó e ajuste os parâmetros disponíveis para controlar a saída da referência.
Sim. Insira até quatro prompts (um por linha) no PrimitiveStringMultiline. Os nós de batch (a3edb32a-4533-45e3-8eb2-84399225da2e) distribuem as entradas para que o pipeline produza até quatro vídeos em uma execução.
Tente aumentar a influência de profundidade ou a consistência temporal no ByteDance2ReferenceNode, diminuir a força do estilo e usar um seed fixo. Certifique-se também de que fps e resolução de entrada são adequados para sua GPU; configurações muito altas podem causar instabilidade.
Não. O SaveVideo gera arquivos de vídeo sem áudio. Se precisar de áudio, exporte do clipe original e remuxe no vídeo estilizado usando seu editor de vídeo.