Run this model with HF Jobs

Run mlx-community/HunyuanVideo-Foley-XXL-mlx-8bit on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/mlx-community/HunyuanVideo-Foley-XXL-mlx-8bit. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/mlx-community/HunyuanVideo-Foley-XXL-mlx-8bit on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

HunyuanVideo-Foley XXL, MLX 8-bit

Tencent's HunyuanVideo-Foley watches a silent video and generates the sound that goes with it, in sync with the picture and steered by an optional text prompt. This is the full pipeline converted for Apple silicon with hunyuanvideo-foley-mlx: the XXL generator (8-bit), the DAC audio decoder, and the SigLIP2, Synchformer and CLAP encoders. No PyTorch needed.

Measured on an M3 Max (36 GB), whole pipeline in mlx-audio with the model loaded:

8 s clip Time Peak memory
50 steps (default) 60 s 8.6 GB
--fast 35 s 8.6 GB

For comparison, the upstream PyTorch generator alone takes 116 s for the same clip on MPS.

Use

pip install -U "mlx-audio[v2a]"
python -m mlx_audio.v2a.generate \
    --model mlx-community/HunyuanVideo-Foley-XXL-mlx-8bit \
    --video clip.mp4 --prompt "footsteps on gravel" \
    --output clip.wav --mux clip_with_sound.mp4
from mlx_audio.v2a import load

model = load("mlx-community/HunyuanVideo-Foley-XXL-mlx-8bit")
for result in model.generate("clip.mp4", "footsteps on gravel"):
    print(result.audio.shape, result.sample_rate)   # 48 kHz mono

--fast (second-order sampler, 30 steps, guidance on the first 80 %) needs about half the compute; in our evaluation (4 clips, 2 seeds, DeSync / CLAP / Audiobox PQ) it scored within the spread between seeds of the 50-step default.

Until video-to-audio support lands in an mlx-audio release, install it from the pull request branch or use the standalone package (pip install git+https://github.com/realAllenSong/hunyuanvideo-foley-mlx).

Files

File Contents
model-*.safetensors XXL generator, 8-bit (group size 64); timestep embedder and final layer in bf16
dac_decoder.safetensors DAC VAE decoder, 50 Hz latents to 48 kHz audio
siglip2_vision.safetensors SigLIP2 vision tower (google/siglip2-base-patch16-512)
synchformer_visual.safetensors Synchformer visual encoder
clap_text.safetensors, clap_tokenizer/ CLAP text encoder (laion/larger_clap_general)
config.json mlx-audio config; config.yaml is the upstream config

Every module matches the upstream PyTorch code on these weights (relative error, float32): generator 6.5e-6, DAC 2.1e-6, CLAP 3e-6, SigLIP2 2.4e-6, Synchformer 1.2e-6. With the same features and noise the 8-bit generator lands within 2 % of PyTorch bf16, with the same quality scores.

Used by ThunderTalk for "sound for a video".

Licence and credit

These weights are a Model Derivative of Tencent Hunyuan under the Tencent Hunyuan Community License, which does not apply in the European Union, the United Kingdom or South Korea; see NOTICE. The conversion carries an attribution term (NOTICE-MLX-PORT): if you use or redistribute these weights, credit "MLX port of HunyuanVideo-Foley by realAllenSong (https://github.com/realAllenSong/hunyuanvideo-foley-mlx)".

Downloads last month
244
Safetensors
Model size
5B params
Tensor type
BF16
ยท
U32
ยท
MLX
Hardware compatibility
Log In to add your hardware

Quantized

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

Model tree for mlx-community/HunyuanVideo-Foley-XXL-mlx-8bit

Finetuned
(3)
this model