Practical overview
When it fits
Use TangoFlux when you need prompt-conditioned audio clips of 1–30 seconds and want an inference route ranging from a demo to Python or command-line integration.
Who it is for
- Developers generating audio from text prompts in Python or from a command line.
- People who want to try the model through its web demo or local web interface.
- Researchers and model developers working with audio generation or the documented training pipeline.
Documented uses
- Generate audio from a written description and save it as a WAV file.
- Try text-to-audio generation through a demo or local interface.
- Train or adapt the model using prepared audio data and the documented Accelerate workflow.
Requirements & limits
The repository provides a Hugging Face Space demo and a Colab notebook. Its instructions also describe installing the package from GitHub to run the local interface, CLI or Python examples. The repository states that commercial model use requires registration with Stability AI or a separate commercial license.
- Generated clips are limited to 1–30 seconds in the documented inference instructions.
- The Python API requires a duration argument; the repository’s example saves audio at 44.1 kHz.
- The project reports different trade-offs between 25 and 50 inference steps: 25 steps are described as faster with similar quality, while 50 steps yielded the best results in its evaluation.
- Training requires prepared audio and configuration files; multi-GPU training uses Hugging Face Accelerate.
- The repository specifies Stability AI attribution and license terms, and separate restrictions for WavCaps-sourced data.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Generate a WAV file from a text prompt with Python
Use the documented Python inference example to generate and save a short audio clip.
Before you start
- Install TangoFlux from the GitHub repository with pip.
- Python packages
torchaudioandtangoflux. - A text prompt and a duration between 1 and 30 seconds.
Steps
Install TangoFlux using the repository’s pip command.
Create a
TangoFluxInferenceinstance with the model namedeclare-lab/TangoFlux.Call
model.generatewith a text prompt, a duration and a step count.Save the returned audio with
torchaudio.saveat 44,100 Hz.
Expected outcome
A generated audio waveform saved as a WAV file.
Guide limitations
- The documented Python example requires a duration between 1 and 30 seconds.
- The repository gives an example using 50 steps but does not establish that this setting suits every use case.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 18 October 2026
- Original website title
- declare-lab/TangoFlux · Official homepage title · retained in its source language

