Spaces:
Running
Running
File size: 2,850 Bytes
afe1a07 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
## FluxMusic: Text-to-Music Generation with Rectified Flow Transformer <br><sub>GUI Implementation</sub>
<a href="https://arxiv.org/abs/2409.00587"><img src="https://img.shields.io/static/v1?label=Paper&message=FluxMusic&color=purple&logo=arxiv"></a>  
<a href="https://huggingface.co/feizhengcong/fluxmusic"><img src="https://img.shields.io/static/v1?label=Models&message=HuggingFace&color=yellow"></a>  
This repo contains a Graphical User Interface (GUI) implementation of the FluxMusic model, based on the paper *Flux that plays music*. It explores a simple extension of diffusion-based rectified flow Transformers for text-to-music generation.
### FluxMusic GUI
We have created a user-friendly GUI for FluxMusic using Gradio. This interface allows users to easily generate music based on text prompts without needing to interact with command-line interfaces.
#### Features:
1. **Model Selection**: Users can choose from different FluxMusic models (small, base, large, giant) via a dropdown menu.
2. **Text Prompt**: Enter your desired text prompt to guide the music generation.
3. **Sliders and Inputs**:
- **Seed**: Set a seed for reproducibility (0 for random).
- **CFG Scale**: Adjust the Classifier-Free Guidance scale (1-40).
- **Steps**: Set the number of diffusion steps (10-200).
- **Duration**: Specify the length of the generated audio in seconds (10-300).
4. **File Management**:
- **Models Folder**: Place your FluxMusic model files (`.pt`) in the `models` folder.
- **Generations Folder**: Generated audio files are saved in the `generations` folder.
5. **File Naming System**: Generated files are named using the format: `[prompt]_[seed]_[model]_[counter].wav`
### Setup and Running
1. Install the required dependencies:
```
pip install -r requirements.txt
```
2. Place your FluxMusic model files in the `models` folder.
3. Run the GUI:
```
python fluxGUI.py
```
4. Use the interface to generate music based on your prompts and preferences.
### Model Information
FluxMusic comes in four sizes: Small, Base, Large, and Giant. You can download these models from the following links:
| Model | Url |
|---------------|------------------|
| FluxMusic-Small | [link](https://huggingface.co/feizhengcong/FluxMusic/blob/main/musicflow_s.pt) |
| FluxMusic-Base | [link](https://huggingface.co/feizhengcong/FluxMusic/blob/main/musicflow_b.pt) |
| FluxMusic-Large | [link](https://huggingface.co/feizhengcong/FluxMusic/blob/main/musicflow_l.pt) |
| FluxMusic-Giant | [link](https://huggingface.co/feizhengcong/FluxMusic/blob/main/musicflow_g.pt) |
### Acknowledgments
The codebase is based on the awesome [Flux](https://github.com/black-forest-labs/flux) and [AudioLDM2](https://github.com/haoheliu/AudioLDM2) repos. |