Video Actor Swap · skill publik Open Skill

Video Actor Swap

Video Actor Swap adalah Open Skill publik di Digen. Buka untuk melihat apa yang dibuat alur ini.

@waytitiai

Film

54 5 28

https://d7qlwi7tl2u27.cloudfront.net/skill-covers/prod/4210253/2026-10-17/59bzc6sq.jpg

---

allowed-tools:
  - generate_image
  - generate_video
  - extract_frame
  - extract_audio
  - mix_clips
  - probe_media
  - recognize_video
  - recognize_image
  - download_video
---

# Video Actor Swap

## When to use
- User wants to replace the character/actor in an existing video with a character image they upload (actor swap / face-body swap / character replacement), keeping the scene, pose, and audio.
- User wants to swap one or more characters in the same video (each original character replaced by a different uploaded character).
- User wants to also change the environment, clothing, props, or other elements while swapping the actor.
- User wants to redo or tweak a previous result from this skill.

## Steps
1. Gather inputs:
   - **Source video** (uploaded asset or a playable URL) — the video whose actor(s) will be swapped. If the user gives a social link (YouTube/TikTok/IG), use `download_video` to get a playable file first.
   - **Subject reference image(s)** — the new actor(s). A close-up face shot locks identity most accurately; if the user instead attaches a photo with a random pose or full body, use all the views present in that photo (face, body, hair, outfit) as the identity reference. For multiple swaps, ask for one reference per original character and confirm which replaces which. If the user can provide 2–3 reference images of the same character (different angles/lighting), collect them — more references lock identity more accurately.
   - **Optional customization** — any environment, clothing, prop, or other changes the user wants applied to the swapped result.
   If only some inputs are provided, ask for the rest before proceeding.
2. `probe_media(url=<video>)` to get duration, resolution, fps, and whether it has an audio track (`has_audio`).
3. `recognize_video(video_url=<video>, prompt="Describe the scene, every character's appearance, pose, and action, and the camera framing. List each distinct character separately, and note the motion/tempo of the action.")` to understand what to preserve and to map each original character to its replacement.
4. `extract_frame(url=<video>, timestamps=[0, 25%, 50%, 75%, near-end])` to get 4–5 stills spread across the video (one image per timestamp) so the motion arc is captured. Use negative timestamps for near-end (e.g. `-1`). `name="Source frame N"`, `entity_type="source_frames"`.
5. Character swap on stills: for each original character, `generate_image(model='i2i', input_urls=[<that character's replacement image(s)>, <source frame>], prompt="Replace the target person in the frame with the uploaded character, keeping the exact pose, body position, scene, lighting, and camera angle. Lock the character's identity to the reference image(s) — same face, body, hair, and outfit across every frame. Leave other characters unchanged.")`. For NSFW stills use bare `model='i2i'` (never the `.hd` variants). `name="Swapped frame N"`, `entity_type="swapped_frames"`. When swapping multiple characters, run this per character (and per frame as needed) so all replacements are applied.
6. Apply optional customization (if the user requested any): `generate_image(model='i2i', input_urls=[<swapped frame>, <any customization reference>], prompt="Apply the requested change to the swapped frame — e.g. new environment/background, clothing, or props — while keeping the character's identity, pose, and framing unchanged.")`. `name="Customized frame N"`, `entity_type="swapped_frames"`. If no customization was requested, skip this step.
7. Generate the swapped video: `generate_video(model='ref2v', input_urls=[<all swapped/customized frames in time order>, <all replacement character images>], prompt="The uploaded character(s) perform the exact same action and pose as in the reference frames, in the same scene, with seamless, natural motion that matches the source video's timing and tempo. Keep each character's identity locked and consistent throughout — same face, body, hair, and outfit in every fr