https://github.com/xsa-dev/ai-lofi-generator
AI-powered lofi music generation using MusicGen, VAE, and other models
https://github.com/xsa-dev/ai-lofi-generator
Last synced: 6 days ago
JSON representation
AI-powered lofi music generation using MusicGen, VAE, and other models
- Host: GitHub
- URL: https://github.com/xsa-dev/ai-lofi-generator
- Owner: xsa-dev
- Created: 2026-04-25T19:03:38.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2026-05-19T09:52:45.000Z (about 1 month ago)
- Last Synced: 2026-05-19T12:26:59.463Z (about 1 month ago)
- Language: Python
- Size: 19.5 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AI Music Generator (Multi-Genre)
Generate instrumental music tracks via MiniMax Music 2.6 API. Supports multiple built-in genres (lofi, hiphop, rock, metal) plus unlimited custom JSON presets.
## Active script
| File | Description |
|------|-------------|
| `model/gen_minimax_lofi.py` | Random generation with built-in skills: `lofi`, `hiphop` + custom JSON skills |
## Usage
```bash
export MINIMAX_API_KEY='...'
# 5 tracks (default: lofi)
python model/gen_minimax_lofi.py
# 10 hiphop tracks (backward-compatible flag)
python model/gen_minimax_lofi.py 10 --style hiphop
# same through the new feature flag
python model/gen_minimax_lofi.py 10 --skill hiphop
# custom skill from model/skills/*.json
python model/gen_minimax_lofi.py 6 --skill hiphop_dark
```
## Custom skills feature
You can add your own generation skill preset as JSON files in `model/skills/`.
- Each file should contain: `bpm_ranges`, `moods`, `genres`, `instruments`, `drums`, `textures`, `ambiences`, `arrangements`, `extras`
- Optional `name` overrides filename as skill name
- Example included: `model/skills/hiphop_dark.json`
Output files are saved to:
- `model/lofi_tracks/*.mp3`
- `model/lofi_tracks/*.meta.json` — prompt saved immediately per track
- `model/lofi_tracks/prompts.log`
## Notes
~6 requests/minute. Cap at ~6-10 tracks per 10-minute window.