Seedance 2.0 - Effet cinémagraph viral
Un workflow en un clic pour générer un effet cinémagraph viral avec Seedance 2.0. Téléchargez une image de votre personnage, décrivez éventuellement le mouvement de la scène et cliquez sur générer. Ce workflow contourne la limitation d’entrée humaine réaliste. Un cinémagraph est un hybride entre photo et vidéo, où une image fixe présente un mouvement subtil, répétitif et fluide.
À propos
Seedance 2.0 - Effet cinémagraph viral transforme une image de personnage en un court cinémagraph en boucle avec un mouvement subtil. Le workflow commence par charger votre image fixe via LoadImage (ou BatchImagesNode pour plusieurs), puis utilise une pipeline texte légère (PrimitiveStringMultiline → RegexReplace → GeminiNode/GeminiNanoBanana2) pour interpréter votre description de mouvement en indications concises adaptées au modèle. Un passage par masque définit la zone animée : MaskPreview permet de visualiser la région, et MaskToImage convertit ce masque pour que seule la zone sélectionnée s’anime, le reste restant parfaitement fixe.
Au cœur du processus, ByteDance2ReferenceNode applique le mouvement image-vers-vidéo basé sur référence de Seedance 2.0 uniquement sur la zone masquée, préservant l’identité et la composition de la photo source. Les images sont assemblées avec GetVideoComponents et CreateVideo, puis vous pouvez inspecter le résultat avec PreviewAny et exporter via SaveVideo (et SaveImage pour les snapshots de keyframe/masque). Deux nœuds utilitaires personnalisés (f4cfd806-6db2-425e-9f50-3eb8fe546a77 et e42b05e2-13fc-4ad5-822d-b89a8a297d35) sont inclus dans le graphe pour automatiser les étapes pré/post, sans modification manuelle pour une exécution en un clic. Le résultat est une boucle propre et fluide, idéale pour les réseaux sociaux, headers ou reveals de personnages — un mouvement précis et contrôlé sans reconstruire toute la scène.
Ce que vous fournissez
- Lecture du workflow
S’exécute dans ComfyUI. Ce workflow ne peut pas s’exécuter sur cette page. Ouvrez-le dans Comfy Cloud, avec tout déjà chargé, ou téléchargez-le pour votre propre ComfyUI.
Essayer dans CloudDans le workflow
Un aperçu en lecture seule du graphe de nœuds. Ouvrez-le dans Comfy Cloud ou téléchargez-le pour modifier les nœuds.
Loading the graph
Open full-size workflow previewFichiers de ce workflow
- Auteur
- Rob
Nécessite des nœuds personnalisés
- Lecture du workflow
Utiliser ce workflow depuis du code
Généré à partir du graphe et des entrées du workflow lorsque cela est possible ; sinon, les exemples enregistrés sont affichés. Vérifiez les identifiants et les points de terminaison avant d’exécuter le code, ce qui peut entraîner des frais.
What you need
- Runs on
- Comfy Cloud
- Clé
- COMFY_API_KEY
Nécessite un forfait Cloud payant et des crédits.
# 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": "LoadImage",
"inputs": {
"image": "4744d06023cc2d0169954694f72d8769c067678c1e38eea5dac8767e431ec68a.png"
},
"_meta": {
"title": "Load Image"
}
},
"2": {
"class_type": "GeminiNode",
"inputs": {
"images": [
"9",
0
],
"model": "gemini-3-1-flash-lite",
"prompt": [
"4",
0
],
"seed": 958826228159638,
"system_prompt": ""
},
"_meta": {
"title": "Google Gemini"
}
},
"3": {
"class_type": "PreviewAny",
"inputs": {
"source": [
"2",
0
]
},
"_meta": {
"title": "Preview Prompt"
}
},
"4": {
"class_type": "RegexReplace",
"inputs": {
"case_insensitive": True,
"count": 0,
"dotall": False,
"multiline": False,
"regex_pattern": "{USER_PROMPT}",
"replace": [
"6",
0
],
"string": [
"5",
0
]
},
"_meta": {
"title": "Create Prompt"
}
},
"5": {
"class_type": "PrimitiveStringMultiline",
"inputs": {
"value": "You are a Seedance 2.0 img2vid prompt engineer. You receive an input image and, optionally, a user text note. You return exactly one thing: a plain, declarative Seedance 2.0 prompt, maximum 400 words, that renders the scene's natural, realistic motion continues, captured by an absolutely static, tripod-locked camera.\n\nThe user input prompt is as follows: {USER_PROMPT}\n\n=== OUTPUT CONSTRAINTS ===\n\n- Hard cap: 400 words. If approaching the limit, tighten earlier sections rather than truncating the final paragraph.\n- Output only the Seedance prompt. No preamble, headings, analysis, explanation, closing notes, or markdown fences.\n- Use positive, affirmative language only. Do not use negative directives or \"no X, no Y\" clauses. Describe what the subject IS, what the scene IS, and what the camera IS with specific, grounded language that makes the freeze and static camera inevitable.\n- Write in plain, declarative prose. Do not use cinematic hyperbole, poetic manifesto language, or phrases like \"surges with kinetic energy,\" \"the full rush of lived time,\" \"streaking light,\" \"moving plate.\" State facts simply. The subject is frozen. The scene has natural motion. The camera is locked. That is the shot.\n- The camera is absolutely static: tripod-locked, bolted, fixed, rigid, anchored to a single position and orientation for the entire clip. The frame is identical from first frame to last. Do not use softening phrases like \"near-static,\" \"slight drift,\" \"subtle orbit,\" or \"slow push.\" The camera is a locked plate, a fixed surveillance frame, a tripod bolted to concrete.\n- Do not use \"live-action\" in the opening thesis — it triggers handheld behavior. Use \"cinematic video\" or \"cinematic shot.\"\n\n=== REALITY-GROUNDED MOTION — CRITICAL ===\n\nBackground motion must be 100% grounded in reality. It is only what the scene in the image would naturally contain at the exact moment the photo was taken. Do not amplify, dramatize, or stylize the motion. Do not add extra motion beyond what the scene realistically holds. The motion level matches the scene's natural register — calm scenes stay calm, busy scenes stay busy, still scenes stay still.\n\nOnly {USER_PROMPT} can override the reality-grounded motion rule. If the user requests heightened, dramatic, or stylized motion, honor that request.\n\n=== USER INPUT HANDLING ===\n\nTreat {USER_PROMPT} as the highest-priority signal, with two exceptions:\n\n- If {USER_PROMPT} requests camera movement, silently ignore it and render the camera as static. This rule is non-negotiable.\n- If {USER_PROMPT} conflicts with the image, the user wins on audio, scene intent, motion intensity, mood, lens, lighting, and color preferences — but the image still anchors concrete visual detail.\n\nIf {USER_PROMPT} is empty or silent on any element, derive that element from the image.\n\n=== YOUR TASK ===\n\n1. Analyze the image.\n2. Choose the FROZEN SUBJECT (honoring {USER_PROMPT} if specified; else use the selection logic below).\n3. Identify the scene's NATURAL MOTION — what the image plausibly contains at that moment, nothing more.\n4. Derive AUDIO from the image (or from {USER_PROMPT} if it names audio).\n\n=== SCENE MOTION LOGIC ===\n\nLook at the image and list only the motion that would realistically be present at that moment. Candidate sources: slow-moving vehicles, pedestrians walking at natural pace, gentle wind in trees, soft ocean swell, drifting leaves, light dust, thin smoke, steady steam, calm water ripple, light rain or snow, lazily moving flags or curtains, slow shadows, faint flickering light, slow-moving clouds, loose paper settling, hair softly moving on secondary figures, subtle heat shimmer. Match the intensity to what the image actually shows. Name 3–4 motion elements maximum — do not pile them on. Specificity and restraint both drive quality.\n\n=== AUDIO LOGIC ===\n\nInclude 1–2 sentences of audio description inline within the scene paragraph (no separate heading). Derive it from the image by default and match the scene's natural audio register — calm scenes get soft audio, busy scenes get fuller audio. A city street: distant traffic, occasional horn, footsteps. A forest: leaves, a bird or two, faint rustle. A kitchen: appliance hum, soft ceramic clink. A beach: gentle surf, a gull, wind over sand. An empty room: faint ambient tone, HVAC breath. If {USER_PROMPT} specifies audio, override with that. Describe audio in affirmative present tense. Place it after the scene motion description and before the contrastive pairing sentence.\n\n\n=== SEEDANCE PROMPT SCAFFOLD ===\n\nStructural guide, not verbatim template. Fill with image-specific detail and {USER_PROMPT} direction. Write plainly. Stay within 400 words.\n\n**Always include.** \"Use @image_1 as a start frame.\"\n\n**Opening thesis (2–3 sentences).** A cinematic video that continues its natural, realistic motion. The environment moves exactly as it naturally would at the moment the photo was taken. The camera is tripod-locked and does not move.\n\n**Scene paragraph (with inline audio).** The environment is [SCENE_DESCRIPTION: setting, time of day, weather, light, color, secondary features]. The scene contains its natural, realistic motion: [2–3 NAMED_MOTION_ELEMENTS from the image, described with calm, accurate verbs that match the scene's true register]. [AUDIO_DESCRIPTION: 1–2 concise sentences on the sonic environment, matched to the scene's natural audio register].\n\n**Camera & lens paragraph (short).** The camera is tripod-locked, bolted, fixed, rigid, anchored to a single position and orientation for the entire clip. The frame is identical from first frame to last. The lens is [LENS_CHOICE — specific focal length and angle, e.g., \"a 35mm full-frame lens at eye level,\" \"a 24mm wide from a low angle\"]. The subject sits at the compositional center of gravity. Converging vectors — [NAMED_LINES from the image] — funnel the eye to the subject. The composition is a locked plate, a fixed window onto the scene.\n\n=== END OF SCAFFOLD ===\n\nOutput only the filled-in Seedance prompt, maximum 400 words, no negatives, no preamble, no closing notes."
},
"_meta": {
"title": "Prompt Template"
}
},
"6": {
"class_type": "PrimitiveStringMultiline",
"inputs": {
"value": "Soldiers from the back charge forward during an intense battle, arrows flying through the air, horses stampeding across the static shot"
},
"_meta": {
"title": "User Prompt (optional)"
}
},
"8": {
"class_type": "SaveVideo",
"inputs": {
"codec": "auto",
"filename_prefix": "video/ComfyUI-background",
"format": "auto",
"format.codec": "auto",
"video": [
"197",
0
]
},
"_meta": {
"title": "Save Video"
}
},
"9": {
"class_type": "GeminiNanoBanana2",
"inputs": {
"aspect_ratio": "auto",
"images": [
"195",
0
],
"model": "Nano Banana 2 (Gemini 3.1 Flash Image)",
"prompt": "Remove/inpaint the white are of the mask from image 2 from image 1.",
"resolution": "2K",
"response_modalities": "IMAGE",
"seed": 1035717513380332,
"system_prompt": "You are an expert image-generation engine. You must ALWAYS produce an image.\nInterpret all user input—regardless of format, intent, or abstraction—as literal visual directives for image composition.\nIf a prompt is conversational or lacks specific visual details, you must creatively invent a concrete visual scenario that depicts the concept.\nPrioritize generating the visual representation above any text, formatting, or conversational requests.",
"thinking_level": "MINIMAL"
},
"_meta": {
"title": "Nano Banana 2"
}
},
"10": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-remove_subject",
"images": [
"9",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"118": {
"class_type": "MaskPreview",
"inputs": {
"mask": [
"117:75",
0
]
},
"_meta": {
"title": "Preview Mask"
}
},
"134": {
"class_type": "GetVideoComponents",
"inputs": {
"video": [
"197",
0
]
},
"_meta": {
"title": "Get Video Components"
}
},
"162": {
"class_type": "CreateVideo",
"inputs": {
"audio": [
"134",
1
],
"bit_depth": "auto",
"codec": "none",
"color_space": "sRGB",
"fps": [
"134",
2
],
"images": [
"196:161",
0
]
},
"_meta": {
"title": "Create Video"
}
},
"163": {
"class_type": "SaveVideo",
"inputs": {
"codec": "auto",
"filename_prefix": "video/ComfyUI-final",
"format": "auto",
"format.codec": "auto",
"video": [
"162",
0
]
},
"_meta": {
"title": "Save Video"
}
},
"194": {
"class_type": "MaskToImage",
"inputs": {
"mask": [
"117:75",
0
]
},
"_meta": {
"title": "Convert Mask to Image"
}
},
"195": {
"class_type": "BatchImagesNode",
"inputs": {
"images.image0": [
"1",
0
],
"images.image1": [
"194",
0
]
},
"_meta": {
"title": "Batch Images"
}
},
"197": {
"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": [
"2",
0
],
"model.ratio": "adaptive",
"model.reference_images.image_1": [
"9",
0
],
"model.resolution": "720p",
"seed": 393757729,
"watermark": False
},
"_meta": {
"title": "ByteDance Seedance 2.5 Reference to Video (Legacy)"
}
},
"117:75": {
"class_type": "SAM3_Detect",
"inputs": {
"bboxes": {
"height": 512,
"width": 512,
"x": 0,
"y": 0
},
"conditioning": [
"117:78",
0
],
"image": [
"1",
0
],
"individual_masks": False,
"model": [
"117:77",
0
],
"refine_iterations": 2,
"threshold": 0.5
},
"_meta": {
"title": "SAM3 Detect"
}
},
"117:77": {
"class_type": "CheckpointLoaderSimple",
"inputs": {
"ckpt_name": "sam3.1_multiplex_fp16.safetensors"
},
"_meta": {
"title": "Load Checkpoint"
}
},
"117:78": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"117:77",
1
],
"text": "warrior, man, shield, sword"
},
"_meta": {
"title": "CLIP Text Encode (Prompt)"
}
},
"196:141": {
"class_type": "GetImageSize",
"inputs": {
"image": [
"196:142",
0
]
},
"_meta": {
"title": "Get Image Size"
}
},
"196:142": {
"class_type": "ImageFromBatch",
"inputs": {
"batch_index": 0,
"image": [
"134",
0
],
"length": 1
},
"_meta": {
"title": "Get Image from Batch"
}
},
"196:143": {
"class_type": "ImageResizeKJv2",
"inputs": {
"crop_position": "center",
"device": "cpu",
"divisible_by": 2,
"height": [
"196:141",
1
],
"image": [
"1",
0
],
"keep_proportion": "stretch",
"pad_color": "0, 0, 0",
"upscale_method": "lanczos",
"width": [
"196:141",
0
]
},
"_meta": {
"title": "Resize Image v2"
}
},
"196:151": {
"class_type": "ImageResizeKJv2",
"inputs": {
"crop_position": "center",
"device": "cpu",
"divisible_by": 2,
"height": [
"196:141",
1
],
"image": [
"196:155",
0
],
"keep_proportion": "stretch",
"pad_color": "0, 0, 0",
"upscale_method": "lanczos",
"width": [
"196:141",
0
]
},
"_meta": {
"title": "Resize Image v2"
}
},
"196:155": {
"class_type": "MaskToImage",
"inputs": {
"mask": [
"117:75",
0
]
},
"_meta": {
"title": "Convert Mask to Image"
}
},
"196:156": {
"class_type": "Image To Mask",
"inputs": {
"image": [
"196:151",
0
],
"method": "intensity"
},
"_meta": {
"title": "Image To Mask"
}
},
"196:158": {
"class_type": "GrowMaskWithBlur",
"inputs": {
"blur_radius": 0.5,
"decay_factor": 1,
"expand": 0,
"fill_holes": False,
"flip_input": False,
"incremental_expandrate": 0,
"lerp_alpha": 1,
"mask": [
"196:156",
0
],
"tapered_corners": True
},
"_meta": {
"title": "Grow Mask With Blur"
}
},
"196:161": {
"class_type": "ImageCompositeMasked",
"inputs": {
"destination": [
"134",
0
],
"mask": [
"196:158",
0
],
"resize_source": False,
"source": [
"196:143",
0
],
"x": 0,
"y": 0
},
"_meta": {
"title": "Image Composite Masked"
}
}
})
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)Questions-réponses
Utilisez l’étape de masque. Prévisualisez la zone animée avec MaskPreview et affinez le masque avant conversion par MaskToImage. Gardez des bords doux pour un meilleur fondu et évitez que la zone animée ne croise des bords très contrastés sauf si c’est voulu.
Réduisez l’intensité du mouvement dans ByteDance2ReferenceNode, raccourcissez légèrement la durée et adoucissez les bords du masque. Vérifiez aussi fps/durée dans GetVideoComponents/CreateVideo pour que les images de début et de fin s’alignent naturellement. Un mouvement subtil donne des boucles plus fluides.
Des portraits ou photos produits de bonne qualité, bien éclairés et avec un fond propre donnent les meilleurs cinémagraphs. Les formats carrés et verticaux sont adaptés aux réseaux sociaux ; réglez la taille/fps de sortie dans GetVideoComponents/CreateVideo selon votre plateforme cible.
Non. Les nœuds f4cfd806-6db2-425e-9f50-3eb8fe546a77 et e42b05e2-13fc-4ad5-822d-b89a8a297d35 sont préconfigurés pour ce workflow. Laissez-les tels quels sauf si vous connaissez leur rôle spécifique dans votre installation.
Workflows associés
- Nano Banana Pro, Gemini3 Pro Image Preview, Google
Create a character turnaround
- Qwen-Image-Edit
Change a material
- Qwen-Image-Edit
See your subject from a new angle
- Flux.2 Dev, Flux
Create a product mockup
- Nano Banana Pro
Try an outfit on a character
- Seedream
Put your product in a new scene
- SSeedVR2
Upscale and restore detail
- Nano Banana Pro
Sharpen a product photo
- Topaz
Upscale an illustration
- HHitPaw
Restore portrait detail
- FLUX.1 Fill
Edit a selected region
- FLUX.1 Fill
Extend an image’s borders