⏳ This skill is pending AI review.

Scores will appear once the review pipeline completes.

version unknown

tein-video-workflow

@sirioberati⭐ 1.4k stars

Run this project's depth, SAM 3 and Enhancor video subject replacement workflow, including full-clip mask review, draft generation, retrieval, and approved HD export.

Choose how to use this skill

You do not need every option. Choose the path your AI client supports. The stable page stays the same; versioned files are immutable.

1. Native installer

This listing has no registered native installer command. Use the complete package or source fallback below, depending on what your client supports.

Do not guess an installer command or replace an existing version without reviewing the diff.

2. Complete package recommended

Download the ZIP when available. It includes SKILL.md plus the references, security notes and version metadata.

No complete ProSkills package is published for this listing yet.

3. Prompt-only

Copy the prompt above when the agent can read the stable page or when you want to adopt the workflow without installing a skill.

Need only the instruction file?

Download SKILL.md only if your client requires a single file. The complete ZIP is safer for a full installation because it preserves the references and release context.

No path installs or executes anything by itself. Your agent still needs access to the project files. Before updating, compare the installed version and review the diff.

—/10

// RATINGS

⭐GitHub Stars
⭐⭐⭐⭐⭐ 1.4k on GitHubGitHub ↗

Very popular

🟢ProSkills Score
—
📍

Not yet listed on ClawHub or SkillsMP

// README

A local UI and agent-assisted workflow for replacing video subjects using colored depth, SAM 3 masks and Seedance through Enhancor. Draft first; approve before 1080p. The final export restores the entire original source audio, not generated audio.

Get access

  • Sign up at TEIN.ai for early access: “The cheapest APIs, open source workflows, and more.”
  • Get the Seedance API at Enhancor.ai — this workflow uses its Seedance integration with human-face support (pass_faces: true), draft previews, and approved 1080p generation. Get your own key from the API dashboard. Current the lowest price in the market; with unrestricted use.

Easiest setup: let your coding agent install it

Extract the ZIP, open this folder in Codex or another coding agent with terminal/file access, and paste:

Set up this TEIN Genjustsu — Open Source Workflow project for me. Read docs/SETUP-AGENT.md and follow it end to end. Detect my OS, install missing Python/Rubber Band/cloudflared prerequisites using the supported package manager, create the main virtual environment, install dependencies, install Python 3.12 and run bash setup-face-mesh.sh for both mesh modes, and create .env without overwriting it. Open .env so I can enter my own keys privately. Run the local tests, launch the app and its callback-only tunnel, run the strict readiness check on a free localhost port, verify the UI and companion images, and give me the working URL. Work independently through setup, respecting system permission prompts. Do not submit paid generations. If keys are missing, launch the UI and clearly tell me generation is waiting for them.

The launcher starts a callback-only Quick Tunnel when no custom webhook is configured. Keep it running with the app. The agent uses the included setup runbook. You only need to supply your own provider keys and approve any required system installation. No separate agent install is required. Native Windows users should use WSL2; macOS/Linux launch scripts are included.

Manual setup

  1. Install Python 3.12+ (the development runtime was Python 3.14) and Rubber Band CLI:
    • macOS: brew install rubberband cloudflared
    • Ubuntu/Debian or WSL: sudo apt install rubberband-cli python3-venv
    • Install cloudflared too, unless you already have a public HTTPS webhook receiver. On launch it creates a temporary callback-only tunnel; the UI and media stay on localhost.
  2. In this folder, run bash setup.sh. This creates an isolated .venv, installs requirements.txt, creates a blank .env, and checks dependencies. To enable all three modes, install Python 3.12 and run bash setup-face-mesh.sh, then .venv/bin/python doctor.py --mesh. On macOS, install the worker interpreter with brew install [email protected] if needed.
  3. Fill .env with your own ENHANCOR_API_KEY and REPLICATE_API_TOKEN. Get them from Enhancor and Replicate. Fund/enable the relevant API accounts. HF_TOKEN is optional for the Hugging Face depth alternative.
  4. Run ./start.command (or bash start.command). Open http://127.0.0.1:8770. Use PORT=8771 bash start.command if the port is occupied.
    • Once running, check .venv/bin/python doctor.py --require-keys. Enhancor requires a webhook URL: launch.py supplies one through cloudflared, or you can set ENHANCOR_WEBHOOK_URL yourself. Keep the app/tunnel running.
  5. Upload your own MP4/MOV, prepare it, inspect the entire mask and prepared video, approve that exact mask, provide your own character references, review the prompt, and create a draft.
  6. When you like the draft, click the 1080p approval button. The completed draft and HD result remain separate; both final previews use source audio.

No local model weights or GPU are needed for the default hosted setup. Python packages and the Rubber Band executable are required locally. No API keys, signed media URLs, or old jobs are included. Four user-selected demonstration videos are included in examples/. The bundled TEIN companion artwork is part of the UI.

What happens

  1. Save the source unchanged; extract audio and separate vocals/music with Demucs on Replicate.
  2. Pitch isolated vocals +3 semitones, maintaining duration with Rubber Band.
  3. Normalize the working video to 24 fps, up to 960 pixels; obtain colored depth with lucataco/depth-anything-video. Preserve returned colors.
  4. Use SAM 3 raw PNG masks on depth. Check alignment, coverage and background spill. An agent can retry segmentation on the original RGB if depth loses detail.
  5. Composite the depth subject over the original background. Mandatory full-clip visual mask review gates every generation. Approval is bound to hashes of the current artifacts.
  6. Embed the pitched vocals into the composite MP4. Send this video, no standalone audio, with character references.
  7. Enhancor Seedance Edit for image references; Omni / multi_reference for a video identity reference. Generate a draft by default.
  8. Poll for completion, download the result, discard its audio and copy the complete original soundtrack into the final MP4.
  9. After explicit HD approval, complete the accepted draft at 1080p and restore the soundtrack again.

Autonomous agent operation

Open this folder in your coding agent and ask it to follow AGENTS.md and .agents/skills/tein-video-workflow/SKILL.md. No particular agent vendor or model is required, but it must be able to inspect video and files, run Python, and access the network. An agent service is not bundled or silently started. The UI/server automates processing and result collection; the agent or user performs visual QA and creative review.

Example: “Use the Genjustsu workflow for my clip and references. Prepare and inspect the entire mask, repair it if needed, show the prompt, submit the authorized draft, and retrieve the final preview. Wait for my approval before HD.”

See agent operations, API integration, models, media hosting, and troubleshooting.

Recovery and checks

.venv/bin/python doctor.py --require-keys
.venv/bin/python test_composite.py
.venv/bin/python -m unittest discover -s tests
.venv/bin/python workflow.py status LOCAL_JOB_ID
.venv/bin/python workflow.py resume LOCAL_JOB_ID
.venv/bin/python workflow.py resume LOCAL_JOB_ID --hd

The server resumes saved Se

// HOW IT'S BUILT

// FILES

2 files shipped with this skill. Inline text is the catalog copy. The upstream link is the source repository.

  • .agents/skills/tein-video-workflow/SKILL.md3.5 KB29d94fd7f481upstream ↗
    ---
    name: tein-video-workflow
    description: Run this project's depth, SAM 3 and Enhancor video subject replacement workflow, including full-clip mask review, draft generation, retrieval, and approved HD export.
    ---
    
    Read the project root AGENTS.md and docs/AGENT-OPERATIONS.md before running a job. Resolve the root as the folder containing workflow.py, not a machine-specific path. Consult docs/ENHANCOR-API.md for request routing and recovery and docs/MEDIA-HOSTING.md before changing upload providers.
    
    Use workflow.py and the local UI; do not recreate credentials or hardcode prior users' media, subjects or request IDs. Carry authorized preparation and collection through to the final preview. Full-clip visual mask QA is mandatory before any generation; if you cannot inspect the video, ask the user to review it. Fix coverage failures with raw masks and, when needed, original-RGB segmentation; preserve the depth model's colors. Approval is invalid after artifact changes.
    
    Prepare +3-semitone isolated vocals inside the video. Route an image identity reference to Edit and video identity reference to Omni. Show the exact prompt and honor the authorized submission scope. Restore the entire original soundtrack on return. Inspect saved request IDs before retrying; resume retrieval instead of duplicating paid requests. Ask before HD unless explicitly approved already. Bound repair attempts to the authorized scope; stop and explain persistent provider or visual failures rather than claiming success.
    
    
    ## Fast alternative: face mesh
    
    Choose **Fast · Face mesh** in the UI, or use `workflow.py prepare VIDEO --mode face_mesh`. Install the optional worker once with `bash setup-face-mesh.sh` (Python 3.12 required; isolated `.venv-face`). The model downloads from Google's official storage on first use.
    
    This path keeps the original video, tracks and saves facial landmarks, draws the mesh, isolates vocals and embeds the +3 pitched vocals. It makes **no depth or SAM calls**. It is currently designed for a single centered speaker; inspect all frames and stop on tracking gaps or incorrect face alignment. Do not claim mask review in this mode: review facial tracking and audio instead. Saved artifact hashes gate submission.
    
    Use the same character references, draft-first submission, collection, original-audio restoration and explicitly approved HD upgrade. In the prompt, explain that mesh lines are motion guidance and must disappear, replace the complete original identity including hair, and preserve all dialogue and timing. Image reference uses Edit; video identity uses Omni. Keep advanced depth mode available. Do not submit automatically during setup.
    
    
    ### Combined depth + face mesh
    
    Select **Advanced + Face mesh** in the UI or use `workflow.py prepare VIDEO --mode depth_mesh`. This runs the original depth/SAM pipeline, preserves its depth composite, then tracks the face from the original frames and overlays the mesh onto that composite. Landmarks are saved in `face-landmarks.json`. Review BOTH mask coverage and face tracking before approval. All artifacts, including depth, mask, mesh and embedded audio, are bound to review approval. Follow the same draft → approved HD → original-audio restoration flow.
    
    For setup with all three preparation modes, also install Python 3.12 and run `bash setup-face-mesh.sh`. This creates an isolated mesh environment; the main app can retain its existing Python version. A Google Face Landmarker model is downloaded at first use. No SAM/depth inference is used by fast mode. Mesh modes are experimental and currently optimized for one centered speaker.
    
  • README.mdupstream ↗

    Contents are not inlined in the catalog. Open the upstream file.

Plain-text copy, no login: /skill-bundles/sirioberati-genjustsu-open-source-workflow-agents-skills-tein-video-workflow.md

// REPO STATS

1.4k stars