/FluxMusicGUI

Text-to-Music Generation with Rectified Flow Transformer

Primary LanguagePython

FluxMusic: Text-to-Music Generation with Rectified Flow Transformer
GUI Implementation

Open in Spaces

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

I 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
FluxMusic-Base link
FluxMusic-Large link
FluxMusic-Giant link

Acknowledgments

The codebase is based on the awesome Flux and AudioLDM2 repos.