*PUBLIC API BUILD https://huggingface.co/ghostai1/GHOSTSONAFB/tree/main/public
π΅ GhostAI Music Generator πΈ
FULL API build [beta build] Optimized to handle full 30/60/180 second renders
Generate high-quality instrumental tracks with Meta AI's MusicGen models!
![]() |
![]() |
π Updated Repo Alert! MUSIC GEN LARGE FULL API [BETA]π
PYTHON/JS/BASH/CURL β’ No MCP AGENTIC YET, CLIENT APP UTILIZES AGENTIC MCP
https://huggingface.co/facebook/musicgen-large
Massive SM80 build optimized for CUDA 12.1 & cuDNN 9! π οΈ π No dependencies, raw file update dropped in repo! π
π« No MCP AGENTIC RAG AI APIβbuilt for 3000 series GPUs with 12GB+ VRAM only. Donβt try 40xx/50xx, itβs a no-go! πΏ
π΅ New SM80 build crafted for large music genβgrab it from the repo! π
π Python 3.10 is the vibe, 3.9 works but might be buggy π
π₯ Get the update here: https://huggingface.co/ghostai1/GHOSTSONAFB
βοΈ Next update: Higher link threading, supports up to 8 GTS, no Gen 4 yet. 50xx support? Maybe later!
UPDATE FOUND HERE: https://huggingface.co/ghostai1/GHOSTSONAFB/blob/main/STABLE12gb3060.py
Scripts: https://huggingface.co/ghostai1/GHOSTSONAFB/blob/main/stable12gblg30sec.py
https://huggingface.co/facebook/musicgen-medium
Use huggingface-cli to sync
π΅ GhostAI Music Generator πΈ & VOCAL UPDATE* barks.py 1.5B Optimized to run on 8GB Will release a Large model 12-24 GB soon UPDATE* Stable float16/32 working on INT8
https://huggingface.co/ghostai1/GHOSTSONAFB/blob/main/start_bash.sh
SH auto downloader dir etc get FB music perms from HF first
FLOAT16/32 CUDA 11.8 & 12.1 4bit for lower end 8 bit full
Welcome to the GhostAI Music Generator! This web-based tool utilizes Meta AI's musicgen-medium
model to craft high-quality instrumental tracks across genres such as Rock, Techno, Jazz, Classical, and Hip-Hop. The application structures compositions with sections like intros, verses, and choruses, all accessible through an intuitive Gradio interface. Outputs are high-quality MP3 files at 320 kbps, complete with embedded metadata. To enhance audio quality, we've integrated processing features including equalization (EQ), a chorus effect, and peak limiting for a polished sound.








Project Evolution and Optimization
Initially, the project faced VRAM limitations on an NVIDIA RTX 3060 Ti with 7.69 GiB. To address this, we divided 30-second tracks into manageable chunksβfirst into three 10-second segments, then into two 15-second segmentsβto optimize memory usage. The Bark model was removed to focus solely on instrumental generation, and we standardized the output format to MP3 for broader compatibility. To achieve a more natural song flow, we varied prompts for each chunk. For instance, the first chunk might use "dynamic intro and expressive verse," while the second employs "powerful chorus and energetic outro," providing a realistic song structure.
Audio enhancements include:
- EQ: Low-pass filter at 6000 Hz and high-pass filter at 100 Hz.
- Chorus Effect: 20ms delay with a -4 dB gain.
- Peak Limiting: Strict limiting at -8.0 dB to control peaks.
- Gain Adjustment: +2 dB boost before crossfading to address amplitude dips.
- Compression: Removed to preserve dynamic range.
π₯οΈ System Requirements
- Operating System: Ubuntu (Note: Windows/macOS are untested).
- GPU: CUDA-capable GPU with at least 8 GB VRAM.
- Python: Version 3.10.
- ffmpeg: Installed for audio processing.
βοΈ Installation and Setup
- Clone the Repository:
git clone https://huggingface.co/ghostai1/ghostai-music-generator cd ghostai-music-generator
βοΈ Installation and Setup
Clone the Repository: git clone https://huggingface.co/ghostai1/ghostai-music-generator cd ghostai-music-generator
Set Up a Virtual Environment: python3 -m venv venv source venv/bin/activate
Install PyTorch (CUDA 12.1): pip install torch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/cu121 For other CUDA versions, refer to https://pytorch.org/get-started/locally/.
Install Other Dependencies: pip install -r requirements.txt
Install ffmpeg: sudo apt-get install ffmpeg
Authenticate with Hugging Face: huggingface-cli login Retrieve token from https://huggingface.co/settings/tokens
Request Access to the Model: Visit https://huggingface.co/facebook/musicgen-medium and request access.
Download and Place Model Weights: mkdir -p /home/ubuntu/ghostai_music_generator/models/musicgen-medium Place the model weights in the directory above. Update local_model_path in app.py if stored elsewhere.
Run Setup Script: chmod +x start_bash.sh ./start_bash.sh