FlowMotion

A model that turns a sentence into a human motion. It learns to predict the clean motion, not the velocity, so the figure stops shivering: jitter 39.5, against 576.7 for plain flow matching.

Learn how a text prompt becomes a 3D motion in 100 small steps, why one change to the training target removes the shake, and how the paper measures smoothness.

Pick a model below and watch the same wrist path replay. Compare the shaking, then read the acceleration bars. Then we build, piece by piece, everything underneath: motion as numbers, flow matching, the new target, the sampler and the score.

You need a feel for a vector (a list of numbers) and a little calculus (speed is the rate of change of position). We build the rest from zero.

A reading for the lecture Modern Generative AI in MIT MMAI: Multimodal AI (Spring 2026, Paul Liang). Paper: Manolo Canales Cuba, Vinícius do Carmo Melício and João Paulo Gois, Universidade Federal do ABC, arXiv 2504.01338. This page is our own teaching reading, not the authors’ text.

Replay the same motion

The three jitter numbers are the paper’s Table 1 (HumanML3D): real motion 47.26, MFM 576.68, FlowMotion 39.52. The wrist path is a made-up toy; its tremor size is set so the toy’s average acceleration, rescaled to match real motion at 47.26, equals each number. The paper notes the original MFM was smoother at batch size 256 than at the 128 used here.

Chapter 0

The Shiver in the Animation

See why a motion can look right in a still frame and still look wrong in motion, and meet the one change this paper makes

You type “a person walks forward and stops” into an animation tool. A 3D figure appears. It walks forward. It stops. The path is right, the feet land, the arms swing. Then you look closely at the moment before the first step. The shoulders buzz. The hands tremble. Nothing in any single frame is wrong, yet the whole clip feels alive in the wrong way.

That buzz has a name. It is jitter: tiny frame-to-frame changes in direction that a real body would never make. It is the problem this paper sets out to fix. The paper is FlowMotion, by Manolo Canales Cuba, Vinícius do Carmo Melício and João Paulo Gois (arXiv 2504.01338). We read it as part of the MIT MMAI lecture on modern generative AI.

What the task is

The task is text-to-motion generation. The input is a sentence. The output is a motion: a list of body poses, one per video frame, played one after another. A pose is the position and rotation of every joint (elbow, knee, hip) at one instant. The paper works at 20 frames per second, so a four-second clip holds 80 poses.

The model must also be generative. One sentence has many right answers, because people walk in many ways. Ask twice and you should get two different, believable walks. The paper lists uses in robotics, VR and AR, entertainment and social spaces in 3D worlds.

How earlier methods fall short

The paper sorts earlier methods by what they give up. Think of four ways to teach a puppet to walk.

VAEs compress motions into a small code and decode them back. The paper says their variety is limited by posterior collapse, where the decoder learns to ignore the code. GANs train a generator against a critic. They suffer mode collapse: the generator repeats a few safe motions. Both give too little variety.

Diffusion models start from noise and clean it up in many steps. They give variety and natural motion. They are slow, because every step runs the whole network. On the paper’s test GPU, the diffusion model MDM needs about 30 seconds per sample. FlowMotion needs about 2 seconds.

Token models (T2M-GPT and MotionGPT) turn motion into a vocabulary of discrete pieces and write it like text. They score the best FID in the paper’s main table (0.124 for T2M-GPT), but their jitter is far from real: 76.05 and 94.77, against 47.26 for real motion.

That leaves flow matching. It is fast, like a short walk instead of a long one. The earlier flow-matching motion model, MFM (Hu et al.), shares MDM’s network. The authors found that on a small GPU, where the batch had to be 128 instead of 256, MFM’s motion shook. Its jitter in Table 1 is 576.68.

The one change

Every flow-matching model trains a network to answer a question at each moment in the journey from noise to motion. MFM asks: “Which way should I move right now?” FlowMotion asks a different question: “What does the finished, clean motion look like?” The direction to move is then worked out from that answer with a short formula.

Written as a trade, as the paper’s abstract puts it: FlowMotion reaches jitter close to real motion in 100 fast steps where plain flow matching shook, because it trains the network to predict the clean target motion rather than the velocity. The abstract reports the best jitter on KIT and the second-best jitter on HumanML3D, with a competitive FID on both.

Before we build it, feel the problem. A wobble can be tiny in position and huge in acceleration. The device below makes that visible.

Add a wobble you cannot see

Top: a smooth wrist path over four seconds, 80 frames. Bottom: the acceleration in each frame. Drag the wobble from 0 to 20 millimetres. The path barely changes. The bars do.

0.0 mm

Illustrative toy: a wrist that swings 25 cm up and down once every two seconds, sampled at 20 frames per second, with random wobble of the chosen size added to each frame. Acceleration in frame i is (yi+1 − 2yi + yi−1) / 0.05². The paper reports jitter in its own dataset units, not metres per second squared.

Here is the reason. Acceleration is the change in speed, and speed is the change in position. Each change divides by the time between frames, which is only 0.05 seconds. Two divisions by 0.05 multiply any frame-to-frame noise by 400. A wobble of 10 millimetres becomes an acceleration of about 8 metres per second squared, close to one g. A real wrist never does that.

So the paper measures smoothness with acceleration, the average size of the acceleration of the body joints. A smooth model matches the number from real captured motion. This is why Chapter 6 treats jitter as a number to match, not a number to push to zero.

The road

  1. Motion as numbers: the shape of a motion, what a frame holds, and how a sentence joins in.
  2. Flow matching from zero: noise travels to motion along a path, and a velocity points the way.
  3. Predict the target: the paper’s loss, and why the network guesses the finished motion.
  4. Walking to the answer: the Euler sampler, and guidance that sharpens the text.
  5. The network inside: the MDM transformer, CLIP, shapes and parameter count.
  6. Measuring smoothness: jitter, FID, and the new FID-J score.
  7. What the tables show: the results, the step sweep and the honest weak spot.
  8. The field guide: numbers, a checklist, the core code, and where to go next.
A generated wrist path looks smooth to the eye, but its acceleration is large in every frame. What is the most direct reason?

Chapter 1

Motion as a Table of Numbers

Count what one frame of a body holds, stack the frames, and see why smoothness lives in the gaps between rows

Imagine you hold a wooden mannequin and must describe its pose to a friend on the phone. You cannot send a photo. You can only read out numbers. You say how high the hips are, how fast the body is turning, how each knee is bent. Your friend needs a fixed list of numbers, in a fixed order, every time.

A neural network has the same problem. It cannot read a 3D figure. It reads a vector: a list of numbers in a fixed order. So the first job of the paper is to turn each pose into a vector, and each motion into a stack of vectors.

One frame is 263 numbers

The paper follows the layout of Guo et al., who made the HumanML3D dataset. Each frame holds these groups of numbers. The root is the body’s anchor, near the hips. Its angular velocity around the vertical axis is one number. Its velocity along the ground is two numbers. Its height is one number.

Then come the joints. The paper lists three groups: joint positions, joint velocities and joint rotations, all measured relative to the root. Last come four foot contact numbers, which say whether a heel or toe touches the ground. Foot contacts tell the model when a foot is planted.

HumanML3D tracks 22 joints, and a frame has 263 numbers. KIT tracks 21 joints, and a frame has 251 numbers. The paper does not print the group sizes. In the Guo layout the root joint has no position or rotation of its own, so positions take 3 numbers for each of 21 joints, rotations take 6 for each of 21, and velocities take 3 for each of all 22. Add them up and you get the paper’s totals, as the device shows.

Count the numbers in a motion

Each row is one frame. Each coloured block is one group of the numbers in that frame. Pick a dataset, then drag the clip length.

4.0 s

The totals (263 and 251), the 20 frames per second and the 196-frame limit are from the paper (Sec. 4.1 and 4.2). The split into five groups is our tally of the Guo et al. layout; it adds up to the paper’s totals but the paper does not print it. Cell shading is decoration, not data.

A motion is a stack of frames

Stack N frames, one under the other, and you get a table with N rows and 263 columns. The paper writes this as a tensor and calls it x1, the target (the clean motion from the dataset).

x1
One clean motion from the training data. The small 1 means “the end of the journey”. Chapter 2 explains why.
ℝ…
A block of real numbers with the shape written above it.
N
The number of poses (frames) in the clip. At most 196 in these datasets.
J
The number of joints per pose.
D
The number of features kept for each joint. In practice the code flattens J and D into one axis of 263 (or 251), so a motion is simply N rows of 263 numbers.

4 s × 20 frames per second = 80 frames  →  80 × 263 = 21,040 numbers

The two datasets differ in size. HumanML3D has 14,616 motion sequences and 44,970 text descriptions. A sequence is cut to at most 10 seconds (196 frames) and at least 40 frames. KIT-ML has 3,911 sequences and 6,353 descriptions, with at most 196 frames and at least 24. Each motion comes with several sentences, written by different people, so one motion has many ways to be asked for.

Where the sentence enters

The sentence is the condition, written c. A text encoder turns it into numbers. The paper uses CLIP (ViT-B/32), a model trained on pairs of images and captions. It turns a sentence into a vector of 512 numbers. The paper keeps CLIP frozen: its weights never change during training, like a dictionary you only look things up in.

Two sentences with similar meaning land near each other in that 512-number space. That is the only job CLIP does here. The motion network learns to read the vector and shape the motion to match.

Why this matters for jitter

Look at the table again, this time down one column. Real motion changes slowly from row to row. A knee that bends 30 degrees in one frame bends 31 in the next. A good model must write a whole column of smooth numbers, for every one of 263 columns, without being told that rows are neighbours. A tiny error in one row, repeated with a different sign in the next, is exactly the buzz from Chapter 0.

That is a hard job. The network writes all 80 to 196 rows at once, in one pass. Nothing forces row 40 to agree with row 41 except what the network learned. The rest of the paper is about teaching it well.

A 5-second HumanML3D clip is generated at 20 frames per second. How many numbers does the model write?

Chapter 2

Flow Matching From Zero

Send a cloud of random dots along straight lines to a picture, and learn the arrows that steer them

Picture a screen full of random dots, like television static. Your job is to move every dot so that, after one second, the dots form a picture of a walking person. No dot may jump. Each one must travel along a path. The simplest path is a straight line from where the dot starts to where it should end.

That is the whole idea of flow matching. The static is the noise. The picture is the data. The movement is the flow. For FlowMotion, a dot is not a point on a screen. It is a whole motion: a table of N frames by 263 numbers. The idea is the same.

Noise, data and the time between them

The start is Gaussian noise: every number drawn at random from a bell curve with mean 0 and spread 1. The paper writes it as x0 and says x0 ∼ N(0, I). It has the same shape as a motion, but it is pure static.

The end is a real motion x1 from the dataset. A clock t runs from 0 (all noise) to 1 (all data). The point between the two, at time t, is xt. The small number is a time stamp, not a power.

The paper uses the straight-line path of Lipman et al. The point at time t is a blend of the two ends:

xt
Where the dot is at time t: a motion table that is part noise and part data.
σmin
A tiny spread left around the data at the end. The paper sets it to 0 in training and sampling, because it “yielded improved performance”. We use 0 from here.
t
The clock, from 0 to 1. At t = 0 the weight on noise is 1. At t = 1 it is 0.
x0
The noise start. Its weight shrinks as the clock runs.
x1
The clean motion. Its weight grows as the clock runs.

With σmin = 0 this reads xt = (1 − t) x0 + t x1. Think of a slider between two photos. At t = 0.25 you see 75% noise and 25% motion. A worked number, in one dimension: let x0 = −1.2 and x1 = 0.8. At t = 0.25 the dot sits at 0.75 × (−1.2) + 0.25 × 0.8 = −0.9 + 0.2 = −0.7.

Move the dots along their paths

Purple dots are noise. Blue dots are data. Each noise dot is paired with one data dot by a straight line. Drag the clock and watch the warm dots, which are xt, slide along the lines.

0.25

Illustrative toy in 2-D: 40 noise dots drawn from a seeded bell curve, paired at random with 40 points on a ring. A real motion has N × 263 numbers, not 2. The straight-line blend is the paper’s Eq. 3 with σmin = 0.

Velocity: the arrow on every dot

A dot that moves needs a velocity: which way, and how fast. Take the formula above and ask how fast xt changes as t grows. The answer is the difference of the two ends:

dxt/dt = x1 − x0    (in the example: 0.8 − (−1.2) = 2.0)

The velocity is the same at every moment of the trip. That is what a straight line means. Check with the example: at t = 0.25 the dot is at −0.7. Starting at −1.2 and moving at 2.0 for 0.25 time units gives −1.2 + 0.5 = −0.7. It matches.

Now give every position and every moment an arrow. That collection is a vector field, the paper’s v(t, x). A dot placed anywhere at any time simply follows the arrows. Following arrows is solving an ordinary differential equation (ODE), the paper’s Eq. 1: the rate of change of the dot equals the arrow where the dot is.

The catch, and the trick

There is a catch. To compute x1 − x0 you must know x1. At generation time x1 is the very thing you want to make. So we cannot read the arrows off a formula. A neural network must learn them from examples.

The examples cross. Two dots from different starts can pass the same point at the same time, each with a different arrow. The network sees only the point and the time, so it learns the average arrow there. This is why the learned flow bends, even though every training path is straight.

The paper cites the key result of Lipman et al. You cannot compute the average over all possible data directly (the paper calls it intractable). But a loss that compares the network to the arrow of one sample at a time has exactly the same gradients, and gradients are all training uses. So we train on one sample and one noise draw at a time. This is conditional flow matching (CFM): conditional, because each path is conditioned on its sample x1.

Straight paths also matter for speed. A path that bends sharply needs many small steps to follow. A nearly straight one needs few. The paper says CFM “promotes straighter trajectories and therefore, faster sampling”.

With σmin = 0, x0 = −1.2 and x1 = 0.8, where is xt at t = 0.25, and what is the velocity?

Chapter 3

Predict the Target, Not the Velocity

Train the network to draw the finished motion, then recover the arrow it needs with one short formula

A student is learning to draw. The teacher can ask two kinds of question. The first: “You are halfway through a sketch. Which way should the pencil move next?” The second: “Look at this half-finished sketch. What will the finished drawing look like?” Both questions carry the same information. But the answers are very different objects. One is a direction, a number that depends on a random start. The other is a clean picture.

Standard conditional flow matching asks the first question. FlowMotion asks the second. This chapter derives why the two are linked, writes the paper’s loss, and walks through one training step with shapes.

The arrow can be rebuilt from the answer

The paper writes the velocity of the path, given the sample x1, as Eq. 4. Here it is with σmin = 0, as the authors use it:

ut(xt | x1)
The velocity the dot should have at xt, given that its trip ends at x1. The bar reads “given”.
x1 − xt
The remaining distance: from where the dot is now to where the trip ends.
1 − t
The remaining time. Distance divided by time is a speed. This is the speed that gets the dot home exactly on time.

We can check it. The path says xt = (1 − t) x0 + t x1. So x1 − xt = x1 − (1 − t) x0 − t x1 = (1 − t)(x1 − x0). Divide by (1 − t) and you get x1 − x0, the same velocity as in Chapter 2. With the numbers from before (xt = −0.7, t = 0.25, x1 = 0.8) the formula gives (0.8 + 0.7) / 0.75 = 2.0.

The important reading is this. If you know xt, t and a value for x1, you know the velocity. So a network that outputs x1 has already told you the velocity. As the paper puts it, the approach “bypasses explicit vector field estimation while preserving the theoretical guarantees of CFM”.

The loss in one line

Call the network Gp (the subscript p stands for “predict”). It takes the noisy blend xt, the time t and the text c, with its learnable numbers θ. It must output the clean motion. The loss is the squared distance to the truth, averaged over data and time:

E
Average over many training examples: clean motions x1 paired with their text, and times t drawn evenly between 0 and 1 (U[0,1]).
Gp(xt, t, c; θ)
The network’s guess of the finished motion, a table of N × 263 numbers. Chapter 5 opens the box.
x1
The true clean motion from the dataset.

This is a plain mean squared error. The baseline MFM instead asks the network to output the velocity and compares it with x1 − x0. The authors use MFM as their ablation (a test that removes one ingredient to see what it did): same network design, same flow, but the other target. The authors train MFM at batch size 128 because of their hardware, while the original MFM used 256.

Why the target might matter

The paper does not prove why target prediction cuts jitter. It gives a hypothesis. The CFM target mixes clean data with Gaussian noise, and small batches make training unstable, so the learned field wobbles at sampling time. Predicting x1 aims the network at a clean motion, so a wobble in the field is smaller.

Here is a simple way to see the difference. The velocity target x1 − x0 contains the raw noise x0, which is rough in every frame. The x1 target is a real motion, smooth along the frames. The device lets you measure the roughness of each.

Two targets, one example

One feature (one column of the table) across 60 frames. Top: the blend xt. Middle: the target FlowMotion trains on. Bottom: the velocity target. Drag t, or draw new noise.

0.50

Illustrative toy: x1 is a smooth made-up curve, x0 is bell-curve noise with spread 1. Roughness is the average size of the second difference between neighbouring frames, the same idea as the acceleration in Chapter 0. This shows what each target looks like; it does not prove why FlowMotion works, and the paper offers a hypothesis, not a proof.

Notice the cost of the swap. Dividing by (1 − t) means a small error in the guess becomes a large error in the velocity when t is near 1. Chapter 4 shows what the sampler does with that, and why it stays safe.

One training step, with shapes

  1. Draw an example. Take a clean motion x1 (shape N × 263) and one of its sentences c.
  2. Draw a time. Pick t uniformly between 0 and 1.
  3. Draw noise. Make x0 with the same shape, every number from N(0, 1).
  4. Blend. Compute xt = (1 − t) x0 + t x1. Shape N × 263.
  5. Predict. Feed xt, t and c to the network. It returns a guess of x1, shape N × 263.
  6. Score. Mean squared error between the guess and x1. Update θ with AdamW at a learning rate of 1 × 10−4, batch size 128.

The paper reports about 24 hours of training on one NVIDIA A30 GPU. For classifier-free guidance (Chapter 4), the network must also learn to answer without the text, written ∅. The paper does not state how often it hides the text during training.

In FlowMotion, what does the network’s output stand for, and how does the sampler get the velocity?

Chapter 4

Walking Toward the Answer

Turn the trained network into a motion by taking 100 short steps, each toward its latest guess of the finished clip

You are hiking down a mountain in thick fog, looking for a hut. You cannot see it. But a guide stands beside you and points. “The hut is that way.” You do not run to the spot the guide points at, because the guide is not sure yet. You walk a short way, and ask again. Now you are closer, the fog is thinner, and the guide points more exactly. After a hundred small walks you arrive.

Sampling in FlowMotion works the same way. You hold a table of random noise. The network is the guide. At each step it looks at where you are and says where it thinks the finished motion is. You take a short step toward that guess, and ask again.

The Euler step

The ODE from Chapter 2 says a dot follows the arrows. A computer cannot follow arrows continuously. It takes small jumps. The simplest rule is Euler integration: look at the arrow here, move along it for a short time, look again. The paper writes it as Eq. 6:

xti+1
The table after this step.
xti
The table before this step. At the start, i = 0, it is the noise x0.
h
The step size, h = 1/M, where M is the number of steps. The times are ti = i/M. The paper uses M = 100, so h = 0.01.
uti(…)
The arrow at this point and time. Chapter 3 shows it is computed from the network’s guess in place of x1.

Each step walks a fraction of the way

Put Chapter 3’s formula inside the step. Write G for the network’s guess at step i. With σmin = 0 the arrow is (G − xti) / (1 − ti), so:

xi+1 = xi + h (G − xi) / (1 − ti) = xi + (G − xi) · 1 / (M − i)

The last part uses h = 1/M and 1 − ti = (M − i)/M, so h / (1 − ti) = 1/(M − i). This is our own algebra from the paper’s equations, and it is the clearest way to read the sampler. Each step walks a fraction 1/(M − i) of the remaining way to the current guess. The first step walks 1/M of the way. The very last step, at i = M − 1, walks the whole way: the final motion is the network’s last guess.

Try it with four steps in one dimension. The noise starts at −1.2. Suppose the guide always points at 0.8. The fractions are 1/4, 1/3, 1/2 and 1. Step 0: −1.2 + 2.0 × 0.25 = −0.7. Step 1: −0.7 + 1.5 × (1/3) = −0.2. Step 2: −0.2 + 1.0 × 0.5 = 0.3. Step 3: 0.3 + 0.5 × 1 = 0.8. You arrive on the guess.

This also answers the worry from Chapter 3. Dividing by 1 − t makes the arrow big near the end. But the step size makes the move small. They cancel into a fraction that never exceeds 1, so a wrong guess can never throw the motion past the guess itself.

Walk to the guess

A 2-D toy. The purple dot is the noise start and the blue dot is the true motion. Warm rings mark the network’s guess at each step, which starts off by a blur and gets exact. Teal dots are your steps. The bars show how much of the remaining way each step walks.

8

Illustrative toy, not a trained model: the guess at time t is the true target plus a fixed blur that shrinks to zero as t reaches 1. The step rule is the paper’s Eq. 6 with Eq. 4 and σmin = 0. The paper uses M = 100 and finds quality settles near 50 steps (Chapter 7).

Making the text count: classifier-free guidance

A network that sees the sentence can still treat it too gently. The paper uses classifier-free guidance, a trick from image generation. Run the network twice: once with the text (Gp(…, c)) and once with the text removed (Gp(…, ∅)). The difference is what the text adds. Then push further along that difference:

G
The guided guess. This replaces x1 in Eq. 4 and is what the sampler uses.
Gp(…, ∅)
The guess with the text hidden: a plain average motion.
s
The guidance scale, a trust slider for the text. At s = 0 the text is ignored. At s = 1 you get the plain text-aware guess. Above 1 you exaggerate it. The paper uses s = 2.5.
Gp(…, c)
The guess that reads the sentence.

The paper sweeps s from 0.5 to 5 in steps of 0.5 (its Fig. 8) and finds the best balance at 2.5: an FID below 0.3 with a jitter near 40. Each step needs both guesses, so guidance costs two network calls per step in the formula as written.

Turn up the text

One number line. Gray: the guess with no text. Warm: the guess that reads the sentence. Teal: the guided guess, which moves with the scale.

2.5

Illustrative numbers: the no-text guess is 0.40 and the with-text guess is 0.90 on a made-up feature axis. The formula is the paper’s. The value s = 2.5 and the finding that it balances FID and jitter are from the paper (Fig. 8 and Sec. 3.5).

With M = 100 steps, the step that starts at t = 0.5 (i = 50) walks what fraction of the remaining way to the current guess?

Chapter 5

The Network Inside

Follow one motion table through the transformer, count its parameters, and see what the paper left unchanged

Think of a round table with 80 people, one for each frame of a four-second clip. Before the meeting, each person writes a note about their own frame. During the meeting, everyone may read everyone else’s note, and each decides whose notes matter most for them. After a few rounds, each person writes a better note. That is a transformer encoder. It is the engine inside FlowMotion.

What a transformer encoder does

A token is one item in a sequence. Here, one token is one frame, held as a vector of 512 numbers. Self-attention lets every token look at all the others and take a weighted mix of what it finds. The weights say how much each other frame matters. For a walk, frame 40 may look hard at frames 38 and 42, its neighbours, and a little at the first frame.

A head is one independent attention pattern. Several heads look for different things at once. After attention, a small feedforward layer processes each token alone. One attention step plus one feedforward step is a layer. The encoder stacks eight of them. The attention step is the only place where frames talk to each other. That makes it the place where smoothness along time can be learned. Our lessons on attention and transformers and the transformer build this from zero.

The design is MDM’s

FlowMotion does not invent a new network. It uses the architecture of MDM (the Motion Diffusion Model of Tevet et al.), a transformer encoder. The only change is the source of the input. MDM receives a motion corrupted by random noise in a diffusion process. FlowMotion receives xt, the straight-line blend from Chapter 2. This is why the comparison with MFM and MDM is fair: the box is the same.

Three things go in:

  1. The sentence. A frozen CLIP-ViT-B/32 encodes the text into one vector of 512 numbers.
  2. The time t. A learned positional encoding turns the clock value into a time embedding, also 512 numbers.
  3. The motion xt. A linear layer projects each 263-number frame to the latent size of 512.

The paper says the text and time encodings are summed in the latent space and then concatenated with xt. We read this, from the paper’s Fig. 2, as one extra token placed in front of the 80 frame tokens. We have not checked the authors’ code. The encoder then returns a sequence of the same length, and a final linear layer maps each 512-number token back to 263 numbers. That table is the guess of x1.

Follow the data through

Pick a stage. The highlighted row shows what the data looks like there, using a four-second clip of 80 frames.

Shapes use N = 80 frames. The sizes 263, 512, 8 layers, 4 heads and 1024 are from the paper (Sec. 3.3, 3.5 and 4.4). Placing the condition as one extra token at the front is our reading of the paper’s Fig. 2 and of MDM’s design, not a quote.

Counting the parameters

A parameter is one learnable number. The paper lists 17.9 million for FlowMotion and 26.3 million for FlowMotion-Big. We can check these. Each layer has four attention matrices (query, key, value and output) of 512 × 512, and two feedforward matrices of 512 × ff, where ff is the feedforward width. Add the input and output projections (263 × 512 each), the time embedding and the text projection. Ignore small bias terms and normalisation weights.

8 layers × (4 × 512² + 2 × 512 × 1024) = 8 × 2,097,152 = 16,777,216

The projections and the time and text paths add about 1.06 million. The total is near 17.8 million, close to the paper’s 17.9. Notice that the number of heads does not appear. Heads split the same 512 numbers into groups, so more heads cost no extra parameters. The Big variant (16 heads, ff 2048) grows because the feedforward doubles.

Tally the parameters

Drag the layers and pick the feedforward width. The bars show where the numbers live.

8

Our own tally, without biases or normalisation weights (about 0.1 million in all). The paper reports 17.9 M (8 layers, 4 heads, ff 1024) and 26.3 M for Big (8 layers, 16 heads, ff 2048). CLIP is frozen and is not counted.

One more design choice matters for smoothness. A text model writes one word after another, left to right. This encoder does not. It sees the whole table at once, and it writes the whole table at once. Each of the 100 sampling steps revises every frame together. So frame 40 can adjust to frame 41 in the same pass, and the later steps can repair what the earlier ones left rough. A left-to-right writer cannot go back.

The cost follows. One generated clip is 100 passes through the network, and with guidance each pass needs the text-aware and the text-free guess. The network is small enough, at 17.9 million parameters, that this takes about 2 seconds on the paper’s RTX 3060.

Everything else is routine. The optimiser is AdamW, with learning rate 1 × 10−4, β1 = 0.9 and β2 = 0.999. The batch size is 128. Sampling uses 100 Euler steps and guidance scale 2.5. The small size is a design goal: the paper wants a model that trains on one 24-hour A30 run and generates in about 2 seconds on an RTX 3060.

FlowMotion and MFM share a network design with MDM. What is the one thing FlowMotion changes about how the network is used?

Chapter 6

Measuring Smoothness and Fidelity

Learn the paper’s score sheet: FID for realism, jitter for steadiness, and a new FID-J that weighs the two together

Two judges watch a gymnast. The first judge asks: “Does this look like what a gymnast does?” The second asks: “Is the body steady, or does it shake?” One gymnast can win the first question and lose the second. A fair final score needs both. The paper builds exactly this, for generated motion.

The standard score sheet

Text-to-motion papers follow Guo et al. and report the same five numbers. Each comes from a pair of encoders (one for motion, one for text) that place both in a shared space of numbers. The paper uses Guo et al.’s pretrained encoders and Euclidean distances there.

FID (Fréchet Inception Distance) asks whether the set of generated motions looks like the set of real ones. Encode both sets, fit a bell-shaped cloud to each, and measure how far apart the clouds are. Lower is better. Real motion scores 0.001 on HumanML3D.

R-Precision (Top-1, Top-2, Top-3) checks the match to the text. Take 32 motion and text pairs. For each text, rank all 32 motions by distance. Count how often the right motion is among the nearest 1, 2 or 3. Higher is better. MM-Dist is the average distance between a text and its generated motion. Lower is better.

Diversity is the average distance between random pairs of generated motions: higher means more variety. MModality asks for 30 motions from the same sentence and measures how far apart they are. Each metric except MModality is repeated over 20 trials, and the tables show the mean and spread.

Jitter

The paper adds Jitter. Following Du et al., it is the average magnitude of the acceleration of the body joints. Lower means smoother, but as Chapter 0 showed, the goal is to match real motion, so the column is marked “→”. (The paper’s text calls the quantity both jerk and acceleration. The formula it describes, and Chapter 0’s toy, use acceleration.)

In practice you take each generated clip, compute the acceleration of every joint in every frame, and average. The paper repeats this over 20 trials, like every metric, to allow for the luck of the draw. Real captured motion has its own jitter, 47.26 on HumanML3D and 49.92 on KIT, because real bodies are not perfectly smooth. That is the number to match.

KIT-ML has a different body scale from HumanML3D, so raw jitter values would not compare. The authors rescale KIT jitter by a factor α = 0.00073, the ratio of the two datasets’ motion ranges. The motion range of a dataset is the mean of the highest joint positions minus the mean of the lowest.

FID-J: one number for both

Now the problem. T2M-GPT has the best FID (0.124) and jitter 76.05. MDM has jitter 46.30, nearest the real 47.26, and FID 0.519. Which model is better? You cannot add 0.124 to 76.05, because the two columns have different scales. FID is a fraction. Jitter is in the tens or hundreds.

The paper’s answer is Mahalanobis FID-J. Treat each model as a point (FID, Jitter). Measure its distance to the ground-truth point (0.001, 47.26) with the Mahalanobis distance:

DM(x)
The FID-J score of one method. Zero means a perfect match to real motion. Lower is better.
x
The method’s vector of two numbers: its FID and its jitter.
μ
The ground-truth vector: FID and jitter of real motion. (0.001, 47.26) for HumanML3D and (0.026, 49.92) for KIT.
S−1
The inverse of the covariance matrix S of the methods’ (FID, jitter) values. It rescales each axis by its natural spread, and accounts for how the two move together.

An everyday version: measure a person’s height in metres and weight in kilograms. A difference of 1 is huge for height and tiny for weight. Mahalanobis distance divides each axis by how much it normally varies. A plain illustration with made-up spreads: suppose FID usually varies by 0.4 and jitter by 25. FlowMotion misses real motion by 0.277 in FID and 7.74 in jitter. In spread units that is 0.69 and 0.31, a combined distance of about 0.76. The real score uses the full covariance, so it differs, but the idea is the same.

To keep the covariance fair, the authors removed outliers only when computing S: TM2T and MFM on HumanML3D, and MFM on KIT (a jitter of 1099.99, found by a robust z-score above 3). Everyone is then scored against the same S. The result: on HumanML3D FlowMotion-Big gets 2.400 and FlowMotion 2.453, ahead of T2M-GPT at 2.615. On KIT FlowMotion gets 8.362, ahead of T2M-GPT at 8.729.

Find the balanced corner

Each dot is a method. Left is smoother-like-real. Down is higher fidelity. The best corner is bottom left. Pick a dataset, then tap a method.

All values are from the paper’s Tables 1 and 2: FID, jitter and FID-J as printed. The horizontal axis is |jitter − real jitter| computed by us, on a log scale, as in the paper’s Fig. 1. Real jitter is 47.26 (HumanML3D) and 49.92 (KIT).

T2M-GPT has the best FID in Table 1, yet FlowMotion has a better FID-J. What explains this?

Chapter 7

What the Tables Actually Show

Read the two main tables, the step sweep and the ablation, and mark what the evidence supports and what it leaves open

A result is only as good as the question it answers. Before we read the tables, fix the three questions. First: does FlowMotion shake less than the flow-matching baseline, MFM? Second: does it still look real and run fast? Third: what does it give up? The tables answer all three, and not always kindly.

Table 1: HumanML3D

Here are the columns that matter most. Params are the parameter count. Jitter is closest-to-real when near 47.26. RP Top3 is text matching, higher is better.

MethodParamsFIDJitterFID-JRP Top3
Real motion-0.00147.260.0000.797
MDM17.9M0.51946.305.0840.706
MFM17.9M0.446576.6832.9060.666
MLD26.4M0.42722.773.3910.758
MotionLCM39.7M0.41637.583.7420.802
MotionGPT332.8M0.18594.774.1480.659
T2M-GPT228.4M0.12476.052.6150.776
FlowMotion-Big26.3M0.26840.812.4000.648
FlowMotion17.9M0.27839.522.4530.663

TM2T is left out of this extract. Read it row by row. FlowMotion’s FID of 0.278 beats MDM and MFM, its flow and diffusion siblings, which have the same network. But the two token models, T2M-GPT and MotionGPT, have a better FID. FlowMotion’s jitter, 39.52, is 7.74 from the real 47.26. Among the other rows, only MDM (0.96 away) is closer; the Big variant, at 40.81, is 6.45 away. The paper calls this the second-best jitter. MFM’s 576.68 is about 12 times the real value.

The size and speed story is real. FlowMotion has 17.9 million parameters; T2M-GPT has 228.4 million. The paper reports about 2 seconds per sample on an RTX 3060, against about 30 for MDM.

Table 2: KIT-ML, and the ablation

MethodFIDJitterFID-JRP Top3
Real motion0.02649.920.000.784
T2M-GPT0.46998.438.7290.737
MDM0.50573.2110.1960.731
MFM0.3271099.9953.8010.405
FlowMotion0.39652.408.3620.404

On KIT, FlowMotion’s jitter of 52.40 is 2.48 from the real 49.92, the best of all. This is the paper’s largest gain: MFM’s jitter is 1099.99.

The paper treats MFM as its ablation. Same network, same flow, a different target. On HumanML3D, switching to the target cut FID from 0.446 to 0.278 and jitter from 576.68 to 39.52. On KIT it cut jitter from 1099.99 to 52.40, but FID rose from 0.327 to 0.396. So the target change is a clear win for smoothness and a mixed result for FID.

How many steps? The sweep

Table 3 and Fig. 7 rerun the sampler with 1 to 100 Euler steps on HumanML3D. Move the slider and read the trend.

Sweep the number of steps

Left: FID by steps (lower is better). Right: jitter by steps, with a dashed line at the real value 47.26. Drag the steps and watch the dot.

100

Values are the paper’s Table 3 (HumanML3D) at 1, 5, 10, 20, 30, 40, 50, 60, 70, 80, 90 and 100 steps. The slider moves through those twelve settings, not through every integer.

At one step the motion is a blurry average: FID 2.515, jitter 188.01. By 5 steps the jitter is already 47.40, near real. By 20 steps FID is 0.413. After about 50 steps both settle: FID 0.295 and jitter 39.19. The authors conclude that around 50 steps is enough, and that 100 buys little.

The weak spot

Now the third question. Look at the text-matching columns. On HumanML3D, FlowMotion’s RP Top3 is 0.663 against 0.797 for real motion, and its MM-Dist is 5.239 against 2.973. MDM, MotionLCM and the token models match the text better. On KIT, FlowMotion’s RP Top3 is 0.404 against 0.784 for real motion.

Compare one metric at a time

Pick a metric. Bars show HumanML3D methods from Table 1. FlowMotion is warm and real motion is the dashed line.

Values from Table 1. Jitter gap is |jitter − 47.26|, computed by us. TM2T is omitted from the bars; its values are in the paper.

The authors say this reflects a focus on realism and diversity, not on literal, canonical motions, and they plan to improve it. That is a reasonable guess, but the paper does not test it. A model that ignores half the sentence would score the same way. Our reading: FlowMotion fixes the shake, and the text link needs more work. The qualitative figures (a circular path in Fig. 4, a straight walk in Fig. 5 and a pre-step stance in Fig. 6) each show one prompt, so they illustrate and do not prove.

The figures add a picture to the numbers. Fig. 4 asks for a circular walk and traces the path: MDM and MFM fail to close the circle, while FlowMotion’s start and end points coincide. Fig. 5 shows “a person walks forward in a straight line” with wrist and heel trails, where MFM and T2M-GPT look jerky. Fig. 6 freezes the instant before a step, on a model trained on KIT: MFM’s body parts tremble and distort, and FlowMotion holds a stable pose. All three are one prompt each.

Cautions when you quote these numbers

Four cautions keep the claims honest. First, the ablation changes the target, but the baseline was trained at batch size 128 because of the authors’ hardware, while the original MFM used 256 and was smoother. So part of MFM’s shake may be small-batch instability, which is the very thing the authors suspect. The paper shows FlowMotion is steadier under these conditions. It does not show how the two compare at a large batch.

Second, the FID-J score needs a covariance matrix, and the paper had only four methods on KIT, with one thrown out as an outlier. A covariance fitted to so few points is fragile, so read the KIT FID-J (8.362 against 8.729) as a small edge, not a large one. Third, the KIT jitter is rescaled by α = 0.00073, so it is only comparable inside the paper. Fourth, the speed numbers (2 seconds against 30) come from one GPU, an RTX 3060, and one setting. They are real, but they are not a benchmark across hardware.

On KIT, MFM has a better FID (0.327) than FlowMotion (0.396). What does the paper’s ablation therefore support?

Chapter 8

The Field Guide

Keep the numbers, the checklist and the core code on one page, and see where FlowMotion sits among its neighbours

FlowMotion turns a sentence into a table of N frames by 263 numbers. It starts from Gaussian noise and takes 100 Euler steps. At each step a small MDM-style transformer guesses the clean motion, and the step walks a fraction 1/(M − i) of the way toward that guess. The only change from plain conditional flow matching is the training target: the network predicts the clean motion x1, not the velocity. On HumanML3D this gives a jitter of 39.52 against 576.68 for the MFM baseline, an FID of 0.278, and about 2 seconds per sample.

The numbers and terms

ItemValueWhere in the paper
Frame rate and clip limit20 frames per second; up to 196 frames (9.8 s)Sec. 4.1
Frame vector263 numbers (22 joints); 251 (21 joints, KIT)Sec. 4.2
DatasetsHumanML3D 14,616 motions, 44,970 texts; KIT 3,911 motions, 6,353 textsSec. 4.1
Pathxt = (1 − t) x0 + t x1, with σmin = 0Eq. 3, Sec. 3.5
Training lossmean squared error between Gp(xt, t, c) and x1Eq. 5
Arrow from the guessu = (G − xt) / (1 − t)Eq. 4
SamplerEuler, M = 100 steps, h = 1/MEq. 6, Sec. 3.5
Guidance scales = 2.5Sec. 3.4, Fig. 8
NetworkMDM transformer encoder; 512 hidden, 8 layers, 4 heads, ff 1024; 17.9 M parametersSec. 3.3, 3.5
Text encoderCLIP ViT-B/32, frozenSec. 3.5
OptimiserAdamW, learning rate 1e-4, batch size 128, about 24 h on one A30Sec. 3.5, 4
Speedabout 2 s per sample (RTX 3060); MDM about 30 sSec. 4
HumanML3D resultFID 0.278, jitter 39.52 (real 47.26), FID-J 2.453Table 1
KIT resultFID 0.396, jitter 52.40 (real 49.92), FID-J 8.362Table 2
Stepsquality settles near 50 stepsTable 3, Fig. 7

A checklist: can you rebuild it?

  1. Data. Can you say what a 263-number frame holds, and why a 4 s clip is an 80 × 263 table?
  2. Path. Can you compute xt for t = 0.25 from a noise and a data value, and its velocity?
  3. Target. Can you show that (x1 − xt)/(1 − t) equals x1 − x0?
  4. Loss. Can you write Eq. 5 and say what the network sees and what it must output?
  5. Sampler. Can you explain why step i walks 1/(M − i) of the way, and why the last step lands on the guess?
  6. Guidance. Can you say what s = 0, 1 and 2.5 do to the guess?
  7. Score. Can you explain why jitter should match real motion and why FID-J needs a covariance?

The core as code

This sketch follows the paper’s equations. It is our own short code, not the authors’. It leaves out the network G and the CLIP encoder, and it leaves out the random hiding of the text during training that guidance needs.

pythonimport torch

def train_step(G, clip_text, batch, opt):
    x1, text = batch                        # x1: (B, N, 263) clean motions; text: B sentences
    B = x1.shape[0]
    t = torch.rand(B, 1, 1)                 # time, uniform in [0, 1]
    x0 = torch.randn_like(x1)               # Gaussian noise, same shape as the motion
    xt = (1 - t) * x0 + t * x1              # straight-line blend, sigma_min = 0 (Eq. 3)
    c = clip_text(text)                     # frozen CLIP: (B, 512); sometimes hidden for guidance
    x1_hat = G(xt, t.view(B), c)            # the network guesses the CLEAN motion: (B, N, 263)
    loss = ((x1_hat - x1) ** 2).mean()      # Eq. 5: squared error to the true target
    opt.zero_grad(); loss.backward(); opt.step()
    return loss.item()

@torch.no_grad()
def sample(G, c, N=80, M=100, s=2.5):
    x = torch.randn(1, N, 263)              # x_0: pure noise
    for i in range(M):
        t = torch.full((1,), i / M)         # t_i = i / M
        g_text = G(x, t, c)                 # guess that reads the sentence
        g_none = G(x, t, None)              # guess with the text hidden
        guess = g_none + s * (g_text - g_none)   # classifier-free guidance, s = 2.5
        u = (guess - x) / (1 - t)           # Eq. 4 with sigma_min = 0: the arrow
        x = x + (1 / M) * u                 # Eq. 6: one Euler step, a fraction 1/(M-i) of the way
    return x                                # (1, N, 263): the motion table

Where it sits in the field

FlowMotion sits at the meeting point of three lines of work. The network and the setup come from MDM, a diffusion model for motion. The training recipe comes from conditional flow matching (Lipman et al.), already used for motion by MFM (Hu et al.). The idea of predicting the clean target instead of a velocity echoes Lipman et al.’s later alternative parameterisation and, in diffusion, Ramesh et al.’s image work. The authors apply it to motion and measure it with a new jitter metric.

Its neighbours trade differently. T2M-GPT and MotionGPT score the best FID but shake more. MLD and MotionLCM aim at speed, through a latent space (MLD) and through distillation (MotionLCM). FlowMotion gets speed from flow matching and keeps the network small. The paper names its own limit: the text-matching scores (RP Top3, MM-Dist, MModality) are weaker, and future work will target them, along with motion editing and full-body detail.

Keep going

The takeaway. Flow matching is fast because its paths are straight. It shook because its training target mixed clean motion with raw noise. FlowMotion keeps the paths and changes the question: “what is the finished motion?” The velocity is then a simple formula, each Euler step is a fraction of the way to the guess, and the jitter falls from 576.68 to 39.52 beside a real-motion value of 47.26.

Credit. FlowMotion is by Manolo Canales Cuba, Vinícius do Carmo Melício and João Paulo Gois of the Universidade Federal do ABC, Brazil (arXiv 2504.01338). All numbers on this page come from their paper unless a device says otherwise. The teaching, the toys and any errors are ours.

Now press Present or Teach and explain the paper from memory: what a motion table is, how the noise travels, why the network predicts the clean motion, how one Euler step uses the guess, and why jitter should match real motion. Then go back to the replay at the top, pick each model in turn, and say what changed in the training that made the bars different.

FlowMotion: Target-Predictive Conditional Flow Matching for Jitter-Reduced Text-to-Motion Generation
Read the paper (arXiv 2504.01338) · MIT MMAI schedule · Back to the lecture