Skip to content

studio: Motion Previs tab, a modified port of Sam Wasserman's Motion Previs Studio - #942

Closed
drowzeys wants to merge 3 commits into
ashhart:mainfrom
drowzeys:upstream/studio-previs
Closed

drowzeys wants to merge 3 commits into
ashhart:mainfrom
drowzeys:upstream/studio-previs

Conversation

@drowzeys

Copy link
Copy Markdown
Contributor

Stacked on #941 (upstream/slate-studio); merge after it.
Commits of this PR only: drowzeys/TensorFold@upstream/slate-studio...upstream/studio-previs (one commit).

A shot you already have now steers a new MiniMax H3 clip on TensorFold. The Motion Previs tab takes a clip apart on the processor (the camera move in words, a pose and OpenPose skeleton, depth, edges, line art, a motion mask) and hands one layer to the create wizard as <Video 1> of a reference clip, rendered by TensorFold's H3 engine on a Mac or a DGX Spark. Its analysis is a Python port, modified, of Motion Previs Studio by Sam Wasserman (https://github.com/wassermanproductions/motion-previs-studio, Apache-2.0).

Receipts, from studio/docs/motion-previs.md (one run each):

  • Analysis cost. A 5 s 864x480 shot with every layer at 12 samples a second: 6.6 s on a Mac Studio M5 Ultra (256 GB) (prepare 0.2, pose 1.3, camera 0.1, depth 3.4, encode 0.9, pack 0.1), 0.5 GB at its peak; 12.6 to 17.6 s and 0.4 to 0.5 GB on a DGX Spark (GB10, 128 GB), with the same camera sentence the Mac gave for that clip.
  • The motion is held. Pose distance of the render from the source (median / 90th percentile, percent of the frame), 5 s at 864x480, seed 7, through the app on the Mac:
Shot What went in Passes Time Distance Result
dummy drill source clip + a picture of a woman Turbo 4, as first shipped 236 s 26.4 / 36.6 strikes lost
dummy drill the same Turbo 4, without the int8 kernels 231 s 3.7 / 11.2 held
dummy drill the same 20 741 s 4.2 / 11.7 held
dummy drill depth + her picture in a bamboo clearing Turbo 4 235 s 3.5 / 11.7 held, in the new place
duel source clip + a new pair, Two or more people Turbo 4, without the int8 kernels 284 s 3.1 / 8.3 both fighters replaced, crane-up followed
  • Sound and movement agree. On the duel (Mac, Turbo 4): the source clip under a soundscape of slaps gave slow sticky hands under slaps (284 s, movement 14.2 / 34.8, flagged impact sound over slow motion); Impacts (the video left out, the picture and prompt carry the fight) gave both fighters punching and blocking in time with the slaps (89 s, 25.0 / 62.4, agree); Flow gave the reference's slow hands, silent (262 s, agree).

Why it matters for TensorFold: it is control-video conditioning on TensorFold's video engine, a step a film crew takes for granted (blocking from a reference) and one no TensorFold application had.

What it adds

  • studio/app/motion.py (the tab's API and the hand-off) with motion_worker.py (the analysis entry point, run in its own environment) and its modules motion_media.py, motion_pose.py, motion_camera.py, motion_depth.py, motion_pack.py; motion_templates/ (Sam Wasserman's Blender import scripts, copied unchanged with a header); motion-requirements.txt.
  • studio/app/motion_prompt.py: the control-video prompt (structural template, first-frame anchor, a legend of the layer, "labels only", what to avoid) and the hand-off into compose_references; studio/app/pace.py: Impacts, Flow and Automatic, and the sound-and-movement measure beside a finished clip.
  • The page: static/motion.js (the tab) and static/motion-ref.js (the wizard's Motion of <Video 1> panel and the hand-off), the tab in page.js / queue.js, the wizard hooks in create.js, and a Tutorial track.
  • Install: scripts/setup-motion.sh (oneshot-setup.sh --motion, 0.5 GB: MediaPipe, OpenCV, ONNX Runtime and the pose and depth models in $PREFIX/motion-venv).
  • Shared code it touches: prompt_text.py (the hand-off and pace lines), job_build.py (a reference left out for Impacts; Flow drops the reference's own hits), job_run.py (the pace measure beside a finished reference clip), server.py (the router).
  • Tests: tests/test_motion.py, six tests: the hand-off wording for the source clip and for a control layer, the plural form, the reference prompt with and without a hand-off, Impacts leaving the video out (and not without a picture, and not over a fast reference), Flow and Automatic, and the tab's API without its environment.
  • Docs and notices: docs/motion-previs.md, the Tutorial chapter, LICENSES/Motion-Previs-Studio-NOTICE, the tab's part of THIRD_PARTY_NOTICES.md (MediaPipe, Depth Anything, OpenCV, ONNX Runtime, NumPy, FFmpeg), NOTICE and CREDITS.md.

How it relates to the engine and to app/

The analysis needs no GPU and no TensorFold code: it runs in its own Python environment, separate from the Studio's. Its output goes to TensorFold's H3 family as a reference video (Ref2VA on a Mac, ComfyUI's Ref2VA node on a DGX Spark). In the desktop app this would be one more tab of the embedded Studio (see #941); the analysis could later run as a worker the app manages.

Tests

Passed Failed Skipped
DGX Spark (GB10, 128 GB) 109 3 0
Mac Studio M5 Ultra, 256 GB 102 10 0

The six new tests pass on both; the failures are the same environment ones as in #941.

Lean check

python3 tools/zig/lean_check.py: 1941 files, 517 problems, unchanged (it scans zig/ and tools/zig/ only). The same rules over studio/: 20 findings, 11 of them as in #941 (/* shell globs) and 9 in the three Blender scripts under motion_templates/, which are Sam Wasserman's files kept as they are.

Not tested

  • A full analysis run on the split modules (the test hosts have no motion environment): the moved functions are AST-identical to the 2.8.0 code, motion_worker.py --probe runs, and the analysis was measured before the split.
  • More than one seed per row above; skeleton layers on more than one shot; figures with more than two people.

What comes next

  • Run the analysis in the tests against a short public clip once the test hosts carry the motion environment.
  • A worker in app/ for the analysis, so the desktop app can offer it without the Studio's server.

Licences

  • Motion Previs Studio 4.1.0, Copyright 2026 Sam Wasserman, Apache-2.0; ported, modified. Its NOTICE (LICENSES/Motion-Previs-Studio-NOTICE), the third-party notices and the header of every motion* file are kept, with the link to the original.
  • MediaPipe, Depth Anything, OpenCV and ONNX Runtime are installed by setup-motion.sh under their own licences (THIRD_PARTY_NOTICES.md); none is bundled. The rendered clip uses MiniMax H3 under the MiniMax H3 Community License. No model weights ship.

🤖 Generated with Claude Code

https://claude.ai/code/session_01PfjmufXm4L7qsVNFyRw9ZK

A web app (FastAPI and plain JS pages) that queues picture and video jobs on a Mac (Metal) or a DGX Spark (CUDA):
Qwen 2.1 Turbo pictures and edits, MiniMax H3 and FastH3 clips with sound, reference pictures, videos and audio,
long chains, the Production board and Editor, the Wasserman Slate workflow (a port of Sam Wasserman's Slate), the
LoRA hub, Library actions, the QA gate and shot check, the memory guard and multi-Spark rendering. The render
scripts under scripts/ and spark/ drive TensorFold's H3 and Qwen-Image families; tests run without a GPU.
Install and use, measured receipts, the agent rules, the credits of every author the Studio builds on, and the
licence notices; no model weights ship with the Studio.
…Previs Studio

The tab takes a shot apart (camera move in words, pose and OpenPose skeleton, depth, edges, line art, motion mask)
in its own environment, and hands one layer to the create wizard as <Video 1> of a MiniMax H3 reference clip, with
the control-video prompt, the pace rules (Impacts, Flow, Automatic) and the measured sound-and-movement flag.
Motion Previs Studio is Copyright 2026 Sam Wasserman, Apache-2.0; its NOTICE, the third-party notices and the file
headers are kept.
@drowzeys
drowzeys force-pushed the upstream/studio-previs branch from bdefa2b to c6c3f61 Compare October 17, 2026 01:30
@ashhart

ashhart commented Oct 18, 2026

Copy link
Copy Markdown
Owner

Thanks @drowzeys for the motion-control work and the measured 6.6-second analysis, plus the 12.6 to 17.6-second runs on the other backend. The source-to-control-layer handoff and the distinction between following motion and following impacts are useful ideas. As explained in #941, we're building the media workspace in TensorFold's app itself. We'll carry those ideas into its stages with credit to you, written as the app's own code rather than taken from the Motion Previs port, and close #942 as the corresponding stage lands. This is app work with its own release timing, not a feature promised for the 1.1.0 engine release. Nothing further is needed from you for this disposition.

Posted by Ash's AI Assistant Synthena

@ashhart

ashhart commented Oct 21, 2026

Copy link
Copy Markdown
Owner

Thank you. Our plan for the whole Studio stack is in #941: we're folding it into the TensorFold app with your authorship kept. We'll keep this open and link the pieces here as they land.

- Synthema, Ash's AI Assistant.

@ashhart

ashhart commented Nov 13, 2026

Copy link
Copy Markdown
Owner

Thank you for this, @drowzeys. The TensorFold app's work is now handled separately from the engine work in this repo, and this PR has had no activity since 2026-10-21, so I'm closing it to keep the open list honest. If you'd like to take it up again, reopen it or open a new one against today's main and we'll look.

  • Synthena (Ash's Agent)

@ashhart ashhart closed this Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants