|
Download README.md from EchoRaven/XMP-T1: direct link, hf CLI and curl.
- Browser
- Download file 6.79 kB
-
https://huggingface.co/EchoRaven/XMP-T1/resolve/main/README.md
- Command line
-
hf download hf://EchoRaven/XMP-T1/README.md
-
curl -L -o README.md https://huggingface.co/EchoRaven/XMP-T1/resolve/main/README.md
6.79 kB
| license: cc-by-nc-4.0 | |
| language: | |
| - en | |
| tags: | |
| - text-to-motion | |
| - motion-generation | |
| - streaming | |
| - flow-matching | |
| - humanml3d | |
| # XMP-T1: streaming text-to-motion | |
| XMP-T1 turns text into human motion as a stream. Each call produces the next 0.6 s of motion, and the caption may change before any | |
| call. It is the main model of the paper *When Did the Caption Start? Onset Clocks in Streaming Text-to-Motion Generation* (Haibo Tong, | |
| Kexiang Zhao, Sixue Xing; arXiv link coming soon). This repository also holds XMP, the same recipe without the T1 training change, and | |
| MATE v1, the text encoder both models need. | |
| Code: <https://github.com/EchoRaven/streaming-t2m-onset-clock> | |
| ## Model | |
| - A causal backbone (6-layer gated delta net, width 512) reads the motion generated so far. A flow-matching head (10 Euler steps, | |
| classifier-free guidance) samples the next three latents, which decode to 0.6 s at 20 fps. | |
| - Text goes through MATE v1, a 4-layer adapter on frozen Flan-T5-large, trained contrastively on the HumanML3D training split. The | |
| generator reads a pooled vector (through AdaLN) and the token states (through 2-layer gated cross-attention). | |
| - Motion lives in the latent space of FloodDiffusion's frozen causal VAE (4 channels, 4 frames per latent). The VAE is not in this | |
| repository. Download it from [AlayaLab/FloodDiffusion](https://huggingface.co/AlayaLab/FloodDiffusion) at the revision the code | |
| README gives. | |
| - 42.5M trainable parameters. One 0.6 s chunk takes about 75 ms at batch size 1 on an RTX A6000, about 8x real time. | |
| - Trained on HumanML3D only, for 40k steps at batch size 128 with EMA 0.999. The released files are EMA weights at the checkpoint | |
| selected on validation for each seed (step 25k; seed 2 of XMP-T1 also at 30k). | |
| ## What T1 changes | |
| In clip-based training data every caption starts together with its clip, so the time since a caption appeared tells the model how far | |
| its action has progressed. Models trained on such data learn this shortcut, which we call an onset clock. In every seed of three | |
| variants of our recipe, re-declaring a walk mid-stream with a paraphrase makes the walk end 1.45 to 2.15 s later than relabelling the | |
| whole history with the same paraphrase. | |
| T1 changes how training streams are stitched. At a caption switch, the next clip can be entered anywhere in its first half, choosing | |
| among 32 candidate clips by pose, instead of within its first 5 latents among 8 candidates. On validation this shortens the label delay | |
| by 0.53 s, and no XMP-T1 seed passes the clock threshold. After a sit-to-stand caption switch, XMP often replays the start of a get-up | |
| clip and drops toward the floor; that rate falls from 0.72 to 0.12. Test FID does not change. T1 weakens the clock; it does not remove | |
| it, since the delay stays above zero. | |
| ## Results | |
| HumanML3D test set, standard evaluator, 20 runs per seed, mean over five training seeds; ± is the s.d. over seeds. "Blind" means the | |
| model is not told the target length; "told" adds a time-to-go input. | |
| | Model | Length | FID ↓ | Top-1 ↑ | Top-3 ↑ | MM-Dist ↓ | Diversity → | | |
| |---|---|---|---|---|---|---| | |
| | XMP-T1 | blind | 0.033 ± .001 | 0.545 ± .002 | 0.827 | 2.794 | 9.503 | | |
| | XMP-T1 | told | 0.038 ± .004 | 0.552 ± .001 | 0.832 | 2.755 | 9.555 | | |
| | XMP | blind | 0.033 ± .003 | 0.545 ± .003 | 0.827 | 2.790 | 9.514 | | |
| | XMP | told | 0.039 ± .004 | 0.553 ± .002 | 0.832 | 2.747 | 9.553 | | |
| The paper re-runs FloodDiffusion, FloodDiffusion 2, CMDM and several offline models under the same protocol. XMP-T1 has lower FID than | |
| the streaming baselines, and CMDM has higher Top-1 (0.583). MATE comes from the same family of models as the standard evaluator, and | |
| both of our models score above real motions on Top-1 (0.513), so a higher Top-1 alone does not mean the motion follows the text better. | |
| ## Files | |
| | Path | Contents | | |
| |---|---| | |
| | `xmp-t1/seed{0..4}/ode_s25000.safetensors` + `.json` | XMP-T1, five seeds. `seed2/ode_s30000.*` is seed 2's length-blind cell. | | |
| | `xmp/seed{0..4}/ode_s25000.safetensors` + `.json` | XMP, five seeds | | |
| | `mate-v1/best.pt` | MATE v1, the original file (md5 starts with `95a681a1`). The code identifies MATE by this md5. | | |
| | `mate-v1/mate_v1.safetensors`, `mate-v1/config.json` | the same MATE weights as safetensors: text tower `text.*`, motion tower `motion.*` | | |
| | `selection.json` | the step and guidance scale selected on validation for each seed and length mode, with their validation scores | | |
| Each `.safetensors` file holds the EMA weights of the backbone (`ema.0.*`), the flow head (`ema.1.*`) and the token read (`ema.2.*`), | |
| and the normalisation statistics (`np.*`). The matching `.json` holds the training config and the rest of the checkpoint. Two absolute | |
| paths from our machines were replaced: `cfg.hml3d` is now `data/HumanML3D` and `cfg.fdvae` is now `data/flooddiffusion`. | |
| ## Use | |
| Set up the code as its README describes: environment, HumanML3D, FloodDiffusion's VAE, Flan-T5-large and the MATE text tables. Then, | |
| inside `flat/`: | |
| ```sh | |
| python tools/hf_weights.py --list # selected step and cfg for every seed | |
| python tools/hf_weights.py --model xmp-t1 --seed 0 # writes runs/lat_fd_seq_ttg_xmp_t1_ema/ode_s25000.pt and runs_mate/mate_v1/best.pt | |
| ``` | |
| `hf_weights.py` rebuilds the checkpoint format the code reads. To evaluate seed 0 length-blind at its selected cell (step 25k, cfg 4.5): | |
| ```sh | |
| python eval_t2m.py --extgen seq_xtok_gen:SeqXtokGenExt \ | |
| --extgen_args ckpt=runs/lat_fd_seq_ttg_xmp_t1_ema/ode_s25000.pt,cfg=4.5,commit=3,sig=0.3,mem_seed=1,ttg=0,use_ema=1 \ | |
| --cfg 4.5 --commit 3 --split test --runs 20 | |
| ``` | |
| Rebuilt checkpoints have a different md5 from ours, so the code's registered tools, which check the original hashes, need | |
| `ONSET_CLOCK_SKIP_PINS=1`. | |
| ## Limitations | |
| - Trained on HumanML3D only: 263-d features of one SMPL skeleton, English captions, clips of at most 10 s. Expect weaker results on | |
| long or unusual prompts and on actions the dataset does not cover. | |
| - T1 weakens the onset clock but does not remove it; re-declaring an action mid-stream can still restart it. | |
| - Left and right are often wrong in compound captions. | |
| - Both models score above real motions on Top-1 with the standard evaluator, so treat Top-1 comparisons with care. | |
| ## License | |
| CC BY-NC 4.0, non-commercial use only. The models are trained on HumanML3D, whose motions come from AMASS and HumanAct12 under | |
| non-commercial terms. FloodDiffusion's VAE and Flan-T5-large keep their own licences and are not included here. The code is MIT. | |
| ## Citation | |
| ```bibtex | |
| @misc{tong2026onsetclock, | |
| title = {When Did the Caption Start? Onset Clocks in Streaming Text-to-Motion Generation}, | |
| author = {Tong, Haibo and Zhao, Kexiang and Xing, Sixue}, | |
| year = {2026}, | |
| note = {arXiv preprint} | |
| } | |
| ``` | |