AI workflow / Local video tool

Swap the actor. Keep the take.

Swap the person in a video and keep their performance. Genjutsu turns a clip into a colored depth silhouette over its own background, tucks the vocals inside, hands that to Seedance with a character reference, then puts the original soundtrack back on. I rebuilt the whole eleven step workflow to run on a Mac with nothing downloaded.

Python + ffmpegApple VisionAUSoundIsolationSeedanceLocal review UI
Real output from the local pipeline, frame for frame.

What happens to your video

Eleven steps, one review gate.

The diagram is the product. Every step writes a numbered file you can open, and nothing reaches Seedance until a person has watched the whole mask.

  1. 01

    the original

    The source is saved untouched. A 24 fps working copy and the original audio are pulled out of it.

  2. 02

    vocals only

    Voice is separated from the music bed. The music is set aside.

  3. 03

    pitched +3

    The vocals move up three semitones with the duration held exact, sample for sample.

  4. 04

    depth

    A colored depth pass of every frame: the subject glows, the room falls away.

  5. 05

    SAM 3 cut-out

    A mask per frame. Stray slivers on the frame edge are cleaned off.

  6. 06

    composite

    The depth subject is laid over the original background, so the scene stays real.

  7. 07

    vocals inside

    The pitched vocals are embedded in the composite. One file, no separate audio.

  8. 08

    you check it

    Three synced players and a per frame coverage strip. Approval is tied to the exact file hashes.

  9. 09

    Seedance + you

    Add a character image or video and the prompt. Generate in your own Seedance composer, or through the Enhancor API.

  10. 10

    song back

    The generated audio is thrown away and the full original soundtrack goes back on, bit for bit.

  11. 11

    1080p .mp4

    The final export at 1080p, with the soundtrack still untouched.

Built on the Mac

Same diagram. No downloads.

The original workflow calls hosted models for vocals, depth and masks. The brief here was to run it locally without pulling any model weights, so each hosted step got an adapter seam: the upstream model when a key is present, a built-in macOS stand-in when it is not. Every stand-in is labeled in the app, never swapped in silently.

StepUpstream modelOn this Mac, free
02 vocals onlyDemucs on ReplicateApple AUSoundIsolation, the high quality voice model already inside macOS, with its 132.6 ms delay measured and removed
04 depthDepth Anything videoStand-in. Pseudo-depth from the mask's distance field plus luminance relief. It moves like depth, but has no true 3D shape
05 cut-outSAM 3 video, text promptApple Vision person segmentation, or foreground instance masks when the prompt names something else
09 SeedanceEnhancor Seedance 2.5Your own Seedance composer: download the step 07 file, generate, import the result
11 1080pEnhancor draft completionStand-in. Lanczos upscale of the draft
11.1 dBvoice separationSpeech over music, against 5.5 dB for my first STFT method
0 mslip sync driftAfter compensating the isolation model's latency
15 ssteps 01 to 07For a 6 second clip on Apple silicon
0installsPython stdlib, numpy, OpenCV, ffmpeg and Swift already on the machine
Not only people: prompt "car" switches to foreground masks.

Guardrails

Built so nothing expensive happens by accident.

Review is a gate

Approval stores a SHA-256 fingerprint of every mask, the composite and the Seedance input. Change one pixel and the approval is void.

Paid calls opt in

Hosted steps need a key plus two confirmations in the UI, one for the spend and one for the public upload. No paid request is ever retried on its own.

Soundtrack proven

The test run checks that the final file's audio packets hash to exactly the source's. The pipeline refuses to trim, loop or stretch audio to make a length fit.

Screens

The workflow you run.

A local web app at 127.0.0.1. The diagram fills in with each step's real output as it runs; on a phone it becomes a single column.

The Genjutsu app on desktop: the eleven step diagram with thumbnails, a done status and control panels for review, Seedance and export The same app on a phone, with the steps stacked in order from audio to 1080p

Limits

What it does not do yet.

Credit

Workflow design by Sirio Berati and TEIN, from the MIT licensed Genjustsu Open Source Workflow. This is an independent local rebuild by Hideki Aono, written from scratch. No TEIN artwork or example media is used.