Add TokTalk weights (epoch 8986), config, statistics and model card
Browse filesFiles changed (4)
- README.mdAdded+89
- config.yamlAdded+33
- epoch=8986.safetensorsAdded+3
- stats_train.npzAdded+3
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889---license: cc-by-nc-4.0tags: - talking-head - facial-animation - flame - 3d - speech-driven-animation - qwen3-omni - flow-matching---
# TokTalk
TokTalk animates a 3D [FLAME](https://flame.is.tue.mpg.de) head directly from the **speech tokens**of [Qwen3-Omni](https://github.com/QwenLM/Qwen3-Omni). It reads the talker's codec frames rather thanthe synthesized waveform, so the face can be generated in step with the speech while the model isstill talking. Driven by Qwen3-Omni on one H100, a realtime voice chat shows the firstspeech and face chunk about 0.4 s after a message is sent.
These are the TokTalk network weights. The inference code is on GitHub:**[Clarivy/TokTalk](https://github.com/Clarivy/TokTalk)**. It provides the `toktalk` Python package,with the realtime browser demo, offline rendering and streaming APIs.
## Files
| File | Content ||------|---------|| `epoch=8986.safetensors` | Network weights: flow-matching U-Net decoder and style encoder (85.8 M parameters, fp32) || `config.yaml` | Network definition (HyperPyYAML) || `stats_train.npz` | Normalization statistics of the FLAME parameters |
`config.yaml` and `stats_train.npz` are also included in the code repository under `toktalk/assets/`.
## Model
```Qwen3-Omni talker ── codec frames (16 codebooks @ 12.5 Hz) ──► Mimi decoder ──► 512-d features @ 25 Hz └──► TokTalk (conditional flow matching) └──► FLAME parameters @ 25 fps```
* **Input:** Qwen3-Omni talker codes, turned into 25 Hz features by Kyutai's [Mimi](https://huggingface.co/kyutai/mimi) decoder (RVQ decoder, causal up-sampler and decoder transformer). Every stage is causal, so the features can be computed incrementally.* **Output:** FLAME 2020 parameters at 25 fps: 50 expression coefficients, 3 jaw-pose values and 3 head-rotation values (axis-angle, radians), 56 per frame.* **Network:** a conditional flow-matching 1-D U-Net with transformer blocks, adapted from CosyVoice / Matcha-TTS. Sampling uses 10 Euler steps with classifier-free guidance (scale 1.2).* **Streaming:** the model sees a sliding window of 100 frames (4 s). Motion that was already emitted is kept fixed by in-painting, so chunks join without seams.* **Style:** an optional 80-d style vector, produced by the style encoder from a reference FLAME clip. The zero vector gives the model's own style. The code repository ships styles for eight RAVDESS emotions.* **Speed:** about 0.08 s of compute per 0.4 s of speech on one H100, with the solver replayed from a single CUDA graph.
## Training data
HDTF and TFHP talking-face videos, as FLAME parameter sequences at 25 fps (in the[DiffPoseTalk](https://github.com/DiffPoseTalk/DiffPoseTalk) format), paired with Mimi featuresof the audio. This is the checkpoint at epoch 8986.
## Usage
With the [code](https://github.com/Clarivy/TokTalk) installed, put the weights where it expects them:
```bashhf download Clarive/TokTalk epoch=8986.safetensors --local-dir toktalk/assets/model```
```pythonimport numpy as npfrom toktalk import TokTalkConfig, TokTalkPipeline
pipe = TokTalkPipeline(TokTalkConfig(device="cuda:0"))codes = np.load("reply.audio_tokens.npy") # (1, 16, T) Qwen3-Omni talker codesparams = pipe.codec_tokens_to_flame_params(codes) # (2T, 56) FLAME parameters @ 25 fpspipe.render_mp4(params, audio_path="reply.wav", output_path="face.mp4")```
Meshes and videos also need the FLAME 2020 model, available after registering at[flame.is.tue.mpg.de](https://flame.is.tue.mpg.de).
## License
The weights are released under [CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/), fornon-commercial use only. The FLAME model, which is needed to turn the parameters into meshes, has itsown non-commercial license. The training data (HDTF, TFHP) is subject to its own terms.123456789101112131415161718192021222324252627282930313233# TokTalk inference model config (self-contained, no external paths).toktalk_model: !new:toktalk.vendor.cosyvoice.flow.flow_matching.ConditionalCFM in_channels: 240 n_spks: 1 spk_emb_dim: 80 cfm_params: !new:omegaconf.DictConfig content: sigma_min: 1e-06 solver: "euler" t_scheduler: "cosine" training_cfg_rate: 0.2 inference_cfg_rate: 0.2 reg_loss_type: "l1" estimator: !new:toktalk.vendor.cosyvoice.flow.decoder.ConditionalDecoder in_channels: 648 out_channels: 56 channels: [256, 256] dropout: 0 attention_head_dim: 64 n_blocks: 4 num_mid_blocks: 12 num_heads: 8 act_fn: "gelu" style_encoder: !new:toktalk.nn.style_encoder.StyleEncoder in_channels: 56
data: max_len: 100 face_fps: 25 param_names: - "exp_params" - "jaw_params" - "head_rotation"123version https://git-lfs.github.com/spec/v1oid sha256:7d70005ee288023e1687def8d328d8ba1de7be556c1cef3764e40fa7fd30111asize 343284360123version https://git-lfs.github.com/spec/v1oid sha256:266f0aa8b883e82997c0b47deac392e6abcbd2eb5b88ff66fe65eebb3c387761size 6734README.mdAdded+89
config.yamlAdded+33
epoch=8986.safetensorsAdded+3
stats_train.npzAdded+3