Downloads · 30 days
159
19% of all-time downloads
YJX-Xiaomi/ControlFoley
ControlFoley is a text-to-audio model from YJX-Xiaomi. Use it for the text-to-audio task on the model card, and read the license before you ship it in a product. It is set up for diffusers. The card lists the license as cc-by-nc-4.0.
Downloads · 30 days
159
19% of all-time downloads
All-time downloads
817
Public
Repo size
16.7 GB
Likes
19
Public
Click a slice to open those files.
.pth14.2 GB · 85%
From the Hugging Face model README
https://github.com/user-attachments/assets/59056500-1711-40a9-9689-5d751767cbdc
For more results of our model, visit Project Page. For comparison with other methods, visit Demo Page.
<hr style="border: none; border-top: 3px solid #333; margin: 16px 0;"><strong>🤗 Official ControlFoley Space on Hugging Face</strong> - The interactive demo was originally created by @apolinario from Hugging Face and is now maintained by the ControlFoley team:
<strong>⚙️ audio.cpp Integration</strong> - audio.cpp, maintained by @0xShug0, added ControlFoley in release 0.7 with native C++ inference and GGUF support:
<img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/comfyui.svg" width="18" alt="ComfyUI" style="display:inline-block;vertical-align:middle;margin:0 6px 0 0;" /><strong>Official ComfyUI Integration</strong> - The ControlFoley team officially publishes and maintains ComfyUI custom nodes and full-task workflows for V2A, TV2A, TC-V2A, AC-V2A, and T2A:
We welcome community workflows, integrations, tutorials, and deployment recipes that help more users build with ControlFoley.
<hr style="border: none; border-top: 3px solid #333; margin: 16px 0;">ControlFoley is a unified and controllable multimodal video-to-audio (V2A) generation framework that enables precise control over generated audio using video, text, and reference audio.
Unlike existing methods that rely on a single modality or struggle under conflicting inputs, ControlFoley is designed to handle complex multimodal interactions and maintain strong controllability even when modalities are inconsistent.
<hr style="border: none; border-top: 3px solid #333; margin: 16px 0;">ControlFoley supports a wide range of applications:
🎬 <strong>Text-Video-to-Audio Generation (TV2A)</strong><br> Video-content-adaptive dubbing and synchronized sound effect generation under text guidance.
📝 <strong>Text-Controlled Video-to-Audio (TC-V2A)</strong><br> Audio generation under video–text conflicts, with semantics consistent with text prompts and temporally synchronized with video contents.
🎧 <strong>Audio-Controlled Video-to-Audio (AC-V2A)</strong><br> Audio generation conditioned on reference audio, with timbre consistent with the reference audio and temporally synchronized with video contents.
📝 <strong>Text-to-Audio Generation (T2A)</strong><br> Generate audio directly from text prompts as an additional capability of the unified framework.
<strong>Joint Visual Encoding for Robust Multimodal Control:</strong> Combines CLIP and CAV-MAE-ST representations to capture both vision-language and audio-visual correlations, improving robustness under modality conflict.
<strong>Timbre-Focused Reference Audio Control:</strong> Extracts global timbre representations while suppressing temporal cues, enabling precise acoustic style control without affecting synchronization.
<strong>Modality-Robust Training with Unified Alignment:</strong> Introduces all-modality dropout and a unified REPA objective to improve robustness across diverse modality combinations.
<strong>VGGSound-TVC Benchmark:</strong> A new benchmark for evaluating textual controllability under visual-text semantic conflicts.
We propose VGGSound-TVC to evaluate text controllability under varying levels of visual-text conflict. In this dataset, textual descriptions of videos are reconstructed in accordance with the rules described below.
This enables systematic analysis of modality dominance and controllability under increasing inconsistency. Example samples from VGGSound-TVC are as follows.
<div align="center"> <img src="assets/benchmark.png" width="100%"> </div> <hr style="border: none; border-top: 3px solid #333; margin: 16px 0;">ControlFoley achieves strong performance across multiple V2A tasks, demonstrating both high generation quality and robust controllability.
🎬 <strong>TV2A</strong>
ControlFoley achieves state-of-the-art performance across multiple benchmarks, including VGGSound-Test, Kling-Audio-Eval, and MovieGen-Audio-Bench.
📝 <strong>TC-V2A</strong>
ControlFoley demonstrates strong textual controllability under increasing visual-text conflict.
🎧 <strong>AC-V2A</strong>
ControlFoley achieves the best performance across all evaluation metrics on the Greatest Hits dataset and the AC-VAS dataset.
Notably, it outperforms CondFoleyGen, a specialized in-domain baseline, demonstrating strong generalization ability.
<div align="center"> <img src="assets/result3.png" width="50%"> </div>ControlFoley also demonstrates competitive or superior performance compared to strong proprietary systems such as Kling-Foley, highlighting its effectiveness as an open and controllable solution.
<hr style="border: none; border-top: 3px solid #333; margin: 16px 0;"># Clone the repository
git clone https://github.com/xiaomi-research/controlfoley
cd controlfoley
# Create conda environment
conda create -n controlfoley python=3.10.16
conda activate controlfoley
# Install dependencies
pip install -r requirements.txt
# Download pretrained weights
pip install huggingface-hub==0.26.2
huggingface-cli download YJX-Xiaomi/ControlFoley --resume-download --local-dir model_weights --local-dir-use-symlinks False
Or you can download the weights from here and put them in the model_weights folder.
python demo.py [OPTIONS]
Options:
--video TEXT Path to the input video file. (default: None)
--audio TEXT Path to the input reference audio file. (default: None)
--prompt TEXT Textual prompt for audio generation. (default: None)
--negative_prompt TEXT Negative textual prompt for audio generation. (default: None)
--duration FLOAT Duration of the generated audio in seconds. (default: 8.0)
--output TEXT Output directory for generated audio files. (default: ./output)
| Task | video | audio | prompt |
|---|---|---|---|
| TV2A | required | None | required |
| TC-V2A | required | None | required |
| AC-V2A | required | required | optional |
| V2A | required | None | None |
| T2A | None | None | required |
Ready-to-use inputs and generated outputs for all supported tasks are available in examples/. You can preview the results directly or reuse the inputs with the commands below.
python demo.py --video "examples/tv2a/tv2a_video_input.mp4" --prompt "skateboarding" --duration 8.0 --output "./output"
python demo.py --video "examples/tc_v2a/tcv2a_video_input.mp4" --prompt "thunder strike" --duration 6.0 --output "./output"
python demo.py --video "examples/ac_v2a/acv2a_video_input.mp4" --audio "examples/ac_v2a/acv2a_reference.wav" --duration 5.0 --output "./output"
python demo.py --video "examples/v2a/v2a_video_input.mp4" --duration 6.0 --output "./output"
python demo.py --prompt "A bird sings melodically in a forest." --duration 10.0 --output "./output"
<hr style="border: none; border-top: 3px solid #333; margin: 16px 0;">
If you find this repository useful, please consider citing our paper:
@misc{yang2026controlfoleyunifiedcontrollablevideotoaudio,
title={ControlFoley: Unified and Controllable Video-to-Audio Generation with Cross-Modal Conflict Handling},
author={Jianxuan Yang and Xinyue Guo and Zhi Cheng and Kai Wang and Lipan Zhang and Jinjie Hu and Qiang Ji and Yihua Cao and Yihao Meng and Zhaoyue Cui and Mengmei Liu and Meng Meng and Jian Luan},
year={2026},
eprint={2604.15086},
archivePrefix={arXiv},
primaryClass={cs.MM},
url={https://arxiv.org/abs/2604.15086},
}
<hr style="border: none; border-top: 3px solid #333; margin: 16px 0;">
This repository is licensed under the Apache License 2.0 and the model weights are licensed under the CC BY-NC 4.0.
<hr style="border: none; border-top: 3px solid #333; margin: 16px 0;">This project uses the following datasets:<br> VGGSound, Kling-Audio-Eval, The Greatest Hits (<a href="https://creativecommons.org/licenses/by/4.0/" target="_blank" style="color:#007bff; text-decoration:none;">CC BY 4.0</a>), and MovieGen-Audio-Bench (<a href="https://creativecommons.org/licenses/by-nc/4.0/" target="_blank" style="color:#dc3545; text-decoration:none;">CC BY-NC 4.0</a>).<br> All resources are used for <strong>academic and non-commercial demonstration purposes only</strong>.
Demo media credits: audio from Pixabay; video from Pexels and Jimeng AI-generated content.
This project is inspired by the following works:<br> stable-audio-tools, MMAudio, Make-An-Audio 2, Synchformer, and audiocraft.<br> Thanks for their contributions.
<hr style="border: none; border-top: 3px solid #333; margin: 16px 0;">If you have any questions or suggestions, please feel free to contact us at yangjianxuan@xiaomi.com.
<hr style="border: none; border-top: 3px solid #333; margin: 16px 0;"> <div align="center">2026 ControlFoley Project. All Rights Reserved.
</div>