AvatarForcing GGUF for avatarforcing.cpp

GGUF weights for avatarforcing.cpp, a C++/ggml port of the AvatarForcing talking-head avatar model (CVPR 2026). You give it a portrait and a speech recording. It returns a lip-synced talking-head video at 512x512 and 25 fps. Inference needs no Python.

Non-commercial use only. The AvatarForcing weights are licensed under CC BY-NC 4.0, and so is this file. See Licence.

Each file holds the three parts of the model:

  • Motion flow transformer. A DiT-style flow-matching transformer (8 blocks, hidden size 1024). It generates 512-d motion latents in blocks of 10 frames, with a rolling KV cache and classifier-free guidance on the audio.
  • Motion autoencoder. A LIA/StyleGAN2-style encoder and decoder. The encoder turns the portrait into an identity code and feature maps. The decoder turns each motion latent into pixels and warps the portrait features with a flow field.
  • Audio encoder. facebook/wav2vec2-base-960h, all 12 hidden states, resampled to 25 fps and projected to 512-d.

The files are a format conversion of the upstream checkpoints. Nothing was retrained or fine-tuned. The engine reads every dimension and hyperparameter from the GGUF metadata, so no config file ships with them.

Files

File Type Size SHA-256
avatarforcing-f16.gguf F16 linear weights, F32 elsewhere 704 MB (703,769,248 bytes) 273d16016b099627c24153e3f25b02e27669d4f92e0d75762d24607df08a0a1d
avatarforcing-f32.gguf F32 1.18 GB (1,181,132,992 bytes) a2c922c7e0adf1461f96d5b5b0a06d7f916f7b6837a687b9f93e90022e00cb3e

Which file to use. Use avatarforcing-f16.gguf. It is 40 % smaller than the F32 file and gives the same video within the quality gates below. Use avatarforcing-f32.gguf for parity tests against the PyTorch reference.

In the F16 file, the linear layers of the flow transformer, the condition embedder, the audio projection and the wav2vec2 encoder are F16 (147 tensors). The motion autoencoder, the wav2vec2 convolutions, the biases, the norms and the tables stay F32.

There is no Q8_0 or 4-bit file. Q8_0 makes the generated motion drift away from the F32 motion over the clip (minimum frame SSIM 0.94 against F32 on a 7.9 s clip), because the sampler is autoregressive and classifier-free guidance amplifies small errors. The frames stay sharp, but the face moves along a different path. The F16 file does not have this problem.

Sources

The converter is scripts/convert_avatarforcing_to_gguf.py of avatarforcing.cpp at commit d394667. The F16 file was made from the F32 file with avatarforcing-quantize of avatarforcing.cpp (avatarforcing-quantize avatarforcing-f32.gguf avatarforcing-f16.gguf f16). The converter read these checkpoints:

Checkpoint From SHA-256
flow_transformer.pth AvatarForcing authors (Google Drive, via download_weights.sh) 1c258fdcc534941ef2cf46a53188690305584ca642099c523db08122e05083cc
motion_autoencoder.pth AvatarForcing authors (Google Drive, via download_weights.sh) 41391516d761a3768bf43ad4ce10f41c66b3a652394610c1be2bc9617f327c33
wav2vec2-base-960h/model.safetensors facebook/wav2vec2-base-960h at 22aad52 8aa76ab2243c81747a1f832954586bc566090c83a0ac167df6f31f0fa917d74a

The GGUF header also records the two .pth hashes (avatarforcing.source.flow_sha256, avatarforcing.source.mae_sha256). The model configuration comes from configs/inference.yaml of AvatarVoice at commit 566f8e1. The converter drops tensors that inference does not use: two boolean mask buffers, the decoder noise-injection weights, one unused ToRGB layer and the wav2vec2 CTC head. The GGUF schema lists every key and tensor.

Usage

# 1. Clone and build avatarforcing.cpp
git clone --recursive https://github.com/mudler/avatarforcing.cpp
cd avatarforcing.cpp
cmake -B build -DGGML_NATIVE=ON
cmake --build build -j8

# 2. Download the model
hf download mudler/avatarforcing-cpp-gguf avatarforcing-f16.gguf --local-dir models/

# 3. Make a talking-head video
build/examples/cli/avatarforcing-cli --model models/avatarforcing-f16.gguf \
    --portrait portrait512.png --audio speech.wav -o out.mp4
  • The portrait must be a face-centred 512x512 image. The tool does not detect or crop faces. scripts/prepare_portrait.py in the code repository makes one.
  • The WAV file can have any sample rate and any number of channels.
  • ffmpeg must be on PATH for the mp4 output. --frames-dir DIR writes PNG frames instead of the mp4, or in addition to it.
  • For an NVIDIA GPU, build with -DGGML_CUDA=ON and run with --backend cuda.
  • avatarforcing-cli info models/avatarforcing-f16.gguf prints the metadata and the tensor count and types of each component.
  • The F16 file needs a version of avatarforcing.cpp that loads F16 weights. An older build rejects it.

The CLI documentation describes all options, including --nfe (default 6), --cfg-scale (default 2.0) and --seed.

Accuracy

The C++ engine matches the PyTorch reference. The end-to-end test runs the upstream streaming inference on the CPU in float32 and runs avatarforcing.cpp on the same input with the same noise. The input is a 7.9 s speech clip (198 frames) at nfe 6. Then the test compares the uint8 frames one by one.

Backend Min SSIM per frame Mean SSIM Largest pixel difference
CPU, F32 0.999988 0.999999 1 uint8 level
CUDA, F32 0.999989 0.999999 1 uint8 level

The mean absolute pixel difference is 0.0002 uint8 levels. Separate parity tests check the flow transformer, the sampler loop, the motion autoencoder and wav2vec2 against reference dumps. The parity reports give the per-module errors.

F16 against F32

The same portrait, audio and noise, nfe 6, frames of the F16 file against the frames of the F32 file on the same backend:

Clip Backend Min SSIM Mean SSIM Min PSNR Mean PSNR
7.9 s speech (198 frames) CUDA 0.9941 0.9981 37.9 dB 50.5 dB
7.9 s speech CPU 0.9988 0.9997 56.2 dB 61.1 dB
2.5 s speech, 44.1 kHz stereo (63 frames) CUDA 0.9985 0.9994 54.7 dB 57.5 dB

The gate is a minimum SSIM of 0.99 and no visible change on a contact sheet. The F16 file passes both. Per component, the largest relative error against F32 is 1.7e-3 (flow transformer KV cache and wav2vec2 hidden states).

Performance

A steady block makes 10 frames, which is 400 ms of video. Real time needs one finished block every 400 ms or less.

Hardware nfe Time per 400 ms block Realtime factor
NVIDIA Thor, CUDA, F32 6 202 ms 0.54
NVIDIA Thor, CUDA, F32 10 241 ms 0.63
16-core x86-64 CPU, 8 threads, F32 6 about 6.2 s (average) 15.6

The realtime factor is the generation time divided by the video length. A value below 1 is faster than real time. The GPU figures use the default overlap mode, where the decoder of one block runs while the sampler computes the next. On the CPU, the motion decoder takes 90 % of the time (0.56 s per frame).

With the F16 file, the sampler of a steady block on Thor takes 126 ms instead of 175 ms (median, nfe 6, the same run with PNG output). The motion decoder is F32 in both files, so its time does not change. On the CPU the F16 file is not faster, because the decoder dominates. The F16 file needs less memory: the peak resident memory of a CPU run is 1.1 GiB instead of more than 1.5 GiB.

Licence

The AvatarForcing weights and the upstream AvatarForcing and AvatarVoice code are licensed under CC BY-NC 4.0. This GGUF file is a format conversion of those weights and is shared under the same licence. You can use it only for non-commercial purposes. The full licence text is in LICENSE.

The file also contains facebook/wav2vec2-base-960h, licensed under Apache-2.0 (text in LICENSE-APACHE-2.0). Because the file holds the AvatarForcing weights too, the CC BY-NC 4.0 terms apply to the file as a whole.

The avatarforcing.cpp engine code is MIT-licensed. That licence does not cover these weights.

NOTICE lists the attributions and the changes made in the conversion.

Attribution

  • AvatarForcing by Taekyung Ki, Sangwon Jang, Jaehyeong Jo, Jaehong Yoon and Sung Ju Hwang (KAIST, NTU Singapore, DeepAuto.ai): the model and its weights. Code, project page, arXiv:2601.00664.
  • AvatarVoice by John Robinson: the real-time streaming variant of the AvatarForcing inference code. avatarforcing.cpp follows its block loop, KV-cache handling and idle audio features.
  • LIA (Latent Image Animator, Wang et al., ICLR 2022): the AvatarForcing authors credit LIA as prior work. The motion autoencoder follows its design. The weights here are the AvatarForcing checkpoint, not LIA's.
  • wav2vec 2.0 (facebook/wav2vec2-base-960h, Baevski et al., NeurIPS 2020): the audio encoder.

Citation

If you use this model, cite the AvatarForcing paper:

@InProceedings{Ki_2026_CVPR,
    author    = {Ki, Taekyung and Jang, Sangwon and Jo, Jaehyeong and Yoon, Jaehong and Hwang, Sung Ju},
    title     = {Avatar Forcing: Real-Time Interactive Head Avatar Generation for Natural Conversation},
    booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
    month     = {June},
    year      = {2026},
    pages     = {18074-18084}
}
Downloads last month
-
GGUF
Model size
0.3B params
Architecture
avatarforcing
Hardware compatibility
Log In to add your hardware

16-bit

32-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Paper for mudler/avatarforcing-cpp-gguf