* raea motion: clips capped at 10 s (300 frames), Kimodo's documented limit Past 10 s a clip drifts and breaks up (Kimodo docs, key_concepts/limitations.md). Measured 11-27: a 12.3 s talk clip's feet spread 47 -> 69 cm, the shoulders rose 9 cm and the last half second glitched. The error says how to go longer: 10 s clips chained through --keys holding the last frames of the one before. * raea motion --seeds N: the best of N takes by the body's faults (foot drift while planted, shoulder rise, hip drop, a hand or forearm into the torso or head), each take's score printed and the kept one's written into the clip; examples/motion runs the verb alone * Fold score.rs's vector helpers onto glam's Vec3 (the dupes gate: sub and dot matched core/grow's and core/sdf's): a point inside a capsule and a foot's sideways drift, the same arithmetic --------- Co-authored-by: shinyobjectz <[email protected]>
6.0 KiB
title, summary, order, sources
| title | summary | order | sources | |
|---|---|---|---|---|
| raea motion | Body motion made on this machine by Kimodo (NVIDIA), on MLX on a Mac and on PyTorch on Linux and Windows: a SOMA clip from a line of words and, with --keys, Kimodo constraints (full-body keyframes, hand or foot targets, a root path, as sdk/body/tools/between.ts writes them), as the clip sdk/body/tools/fromkimodo.ts reads. | 107 |
|
Body motion made on this machine by Kimodo (NVIDIA), on MLX on a Mac and on PyTorch on Linux and Windows: a SOMA clip from a line of words and, with --keys, Kimodo constraints (full-body keyframes, hand or foot targets, a root path, as sdk/body/tools/between.ts writes them), as the clip sdk/body/tools/fromkimodo.ts reads.
Usage
raea motion "LINE" [--keys KEYS.json] [--seconds 5 | --frames N] [--seed 1] [--seeds 1] [--steps 100] [-o CLIP.json] (body motion made on this machine by Kimodo (NVIDIA): a SOMA clip from a line of words and, with --keys, Kimodo constraints (full-body keyframes, hand or foot targets, a root path, as sdk/body/tools/between.ts writes them), as the clip sdk/body/tools/fromkimodo.ts reads. On a Mac it runs on MLX (Apple silicon's GPU): the first use fetches the motion model (1.1 GB) into raea's models folder, and the first new line its text encoder (8.8 GB: Llama 3 8B in 8 bits with LLM2Vec's adapters). On Linux and Windows it runs upstream Kimodo on PyTorch, set up once by raea setup motion: on an NVIDIA GPU with CUDA (the text encoder, 16 GB in bf16, on the CPU unless the card has 18 GB or more), else on the CPU alone; reading a new line on the CPU takes about 18 GB of memory. A line's words are read once and kept. --seeds N makes N takes (seeds SEED to SEED+N-1) and keeps the one with the fewest faults: a foot sliding while planted, the shoulders shrugging, the hips sinking, a hand or forearm into the torso or head (a skeletal check; each take's score is printed and the kept one's written into the clip). Licences: Kimodo's weights NVIDIA's Open Model License, Meta Llama 3 the Meta Llama 3 Community License, LLM2Vec's adapters MIT, Kimodo's code Apache-2.0)
Headless: it needs nothing running and opens no window. Takes up to 1 argument besides its flags.
Flags
| Flag | Takes | What it does |
|---|---|---|
--frames |
N |
The clip's length in frames at 30 a second, 2 to 300 (10 s, Kimodo's limit: longer clips drift and break up; chain 10 s clips through --keys instead). Instead of --seconds. |
--keys |
KEYS.json |
Kimodo constraints the motion must meet: full-body keyframes, a hand or foot at a place on a frame, a path for the hips. bun sdk/body/tools/between.ts writes them between two poses of the body library. |
--seconds |
5 |
The clip's length in seconds (5 unless said). |
--seed |
1 |
Which of the motions the line could be: another seed is another take of the same line. A seed on MLX is not that seed on PyTorch (the noise is drawn differently), so the same seed is a different take on a Mac and on Linux or Windows. |
--seeds |
1 |
How many takes to make, seeds --seed up: the one with the lowest score is kept and its score written into the clip (score: foot drift while a foot is planted, shoulder rise above the take's usual, hip drop below standing, and how far a hand or forearm goes into the torso or head, in cm, summed over allowances of 1, 3, 5 and 1 cm). The collision is a skeletal check, capsules sized for SOMA's average adult, not the body's mesh. |
--steps |
100 |
Denoising steps (Kimodo's 100). Fewer is faster and rougher. |
-o |
CLIP.json |
Where the clip goes: {fps, names, root, turns, contacts, ...}, Kimodo's 77 SOMA joints as each one's turn in the world from the T-pose. Without it, the line's words name the file in the working folder. |
Example
A stage's do line made into a clip: the body stands at the start and the end, and the motion between comes from the
words.
bun sdk/body/tools/between.ts skeleton.json LIBDIR aMale2_A1_Stand:0 aMale2_A1_Stand:0 stand.json 4 0,0 0
raea motion "A person waves at the camera with their right hand" --keys stand.json --seconds 4 --seed 2 -o wave.clip.json
The best of four takes of a line, by the faults a body would show:
raea motion "A person stands in place and talks, gesturing with both hands" --seconds 10 --seeds 4 -o talk.clip.json
Longer than 10 s, make 10 s clips one after another, each with --keys holding the last second of the one before as
full-body keyframes, and ease each into the next over those frames: Kimodo keeps full-body keys to a few centimetres,
not exactly, so a clip cut straight onto the next would jump.
A clip takes about 8 seconds on an M5 Pro. bun sdk/body/tools/makedo.ts does the whole of it for a stage's lines:
three seeds a line, each checked against the captures the body hands on to, and the one that does the most kept in the
project's made clips.
Where it runs
On a Mac, Kimodo runs on MLX, on the GPU, with no Python. The first use fetches the motion model (1.1 GB), and the first new line the text encoder (8.8 GB).
On Linux and Windows it runs upstream Kimodo (nv-tlabs/kimodo) on PyTorch. Run raea setup motion once first: it needs
uv on PATH, makes a Python environment in raea's models folder, and fetches the weights,
about 26 GB in all. With an NVIDIA GPU the motion runs on CUDA, and the text encoder (Llama 3 8B Instruct, 16 GB in
bf16) joins it on a GPU of 18 GB or more. On a smaller card the encoder runs on the CPU and needs about 18 GB of memory.
With no NVIDIA GPU everything runs on the CPU. raea setup motion --check says what is set up and where each part runs.
Both backends write the same clip file. A line's words are read once and kept, so the encoder loads once a line.
Licences: Kimodo's code is Apache-2.0 and its weights are under NVIDIA's Open Model License. The text encoder is Meta Llama 3 8B Instruct (Meta Llama 3 Community License) with LLM2Vec's adapters (MIT).