Local prep, prompt linting, masking, plate compositing and exact frame finishing for ByteDance Seedance 2.0 and 2.5, built for coding agents.
Paste this into your coding agent, then talk to it in plain english about the shot you want to fix.
Install or update legends-seedance via cto-legends (https://github.com/avalonreset/cto-legends): run `cto-legends install legends-seedance --apply`, then `cto-legends handoff legends-seedance` and follow the returned recipe to verify `legends-seedance doctor`.
Generalist VFX and prompt kit for ByteDance Seedance 2.0 and 2.5. Runs locally on Windows, macOS, and Linux. No credentials, no network calls: it prepares, lints, masks, composites, and finishes clips so every paid generation on any host starts from a clean input.
Works with BytePlus ModelArk, fal.ai, Replicate, WaveSpeedAI, Dreamina, TopView, or any other Seedance host.
- Pass-through failures on same-color edits: deterministic
high-contrast ROI masking (
mask) plus verb-first timestamped prompts (compile,lint). - Slot-machine drift on local fixes: feathered plate compositing
(
composite) restores the approved master outside the repair. - Silent-clip speech hallucination and token traps: caught by
lintbefore any spend. - Duration and cost surprises:
probechecks model bounds, andfinishretimes returns to an exact frame count with restored audio.
# Recommended for agents: install through the cto-legends router
cto-legends install legends-seedance --apply
# Standalone from the tagged GitHub release
pip install "legends-seedance @ git+https://github.com/avalonreset/[email protected]"
pip install "legends-seedance[opencv] @ git+https://github.com/avalonreset/[email protected]" # optional fast dilation
pip install "legends-seedance[sam2] @ git+https://github.com/avalonreset/[email protected]" # optional SAM 2.1 tracking
# From a checkout, with tests
pip install -e ".[dev]"Requires Python 3.10+ and ffmpeg (with ffprobe) on PATH.
Optional: rife-ncnn-vulkan on PATH, or set
LEGENDS_SEEDANCE_RIFE_BIN to its path. Without RIFE, finish
falls back to ffmpeg minterpolate with a clear warning.
Check your setup:
legends-seedance doctor --json# Environment readiness (offline, exit 0 when core is ready)
legends-seedance doctor --json
# Probe frames, fps, audio, model bounds, AAC priming risk
legends-seedance probe clip.mp4 --model 2.5 --json
legends-seedance probe clip.mp4 --model 2.0 --json
# Lint a prompt (tag styles @Image1, [Image1], {{Image1}} all work)
legends-seedance lint -f prompt.txt --mode surgical_edit --silent --masked --model 2.5 --json
# Compile a tight prompt from a template, then auto-lint it
legends-seedance compile --template surgical --window "1.4s to 2.5s" \
--old "the green masked region" --new "a natural hand" \
--lighting "Match the soft window light." --json
legends-seedance compile --template side-profile --new "the subject" --lighting "..."
# Break pass-through with a high-contrast mask plus preview sheet
legends-seedance mask --video base.mp4 --out masked.mp4 --preview preview.jpg \
--start-frame 34 --end-frame 59 --roi 420,120,1320,620 --mode box
legends-seedance mask --video base.mp4 --out masked.mp4 --preview preview.jpg \
--start-frame 34 --end-frame 59 --roi 420,120,1320,620 --mode sam2 --pos-points "800,300"
# Reference cards and silent prep
legends-seedance refcard crop --input sheet.png --out detail.png --box 0.3,0.8,0.5,0.99 --upscale 3
legends-seedance refcard two-panel --left front.png --right profile.png --out card.png
legends-seedance refcard strip-audio --input clip.mp4 --out clip-silent.mp4
# Retime a return to exact frames, restore untouched WAV, build QC sheet
legends-seedance finish --raw download.mp4 --out final.mp4 --target-frames 114 \
--work-dir work --audio-wav source.wav --compare-with base.mp4 --qc-sheet qc.jpg
# Composite only the repaired region onto the approved plate
legends-seedance composite --base approved.mp4 --patch repaired.mp4 --out locked.mp4 \
--roi 400,115,1340,640 --start-frame 32 --end-frame 62 --feather 28 --temporal-fade 4Every command prints structured JSON, ready for AI agents and scripts.
| Seedance 2.0 | Seedance 2.5 | |
|---|---|---|
| Duration | 4-15s | 4-30s |
| References | up to 12 total | up to 50 total |
| Audio refs | up to 3 | up to 10, 15 MB each |
Cap audio-primed exports at 29.96s (719 frames at 24 fps) to avoid
AAC priming overflow past the 30s limit. probe warns automatically.
Part of cto-legends. The central router skill is vendored at skills/cto-legends/SKILL.md; this module does not register a separate host skill or run a background daemon.
cto-legends install legends-seedance --apply
cto-legends handoff legends-seedance
cto-legends run legends-seedance -- doctor --jsonThen follow docs/AGENT-RECIPE.md.
MIT. See LICENSE.
