Add transformers backend for MusicGen (Python 3.13+ compatible)
The generate_music() function now supports two backends: 1. audiocraft (preferred): - Original MusicGen implementation - Works on Python 3.12 and lower - Falls back to transformers if not available 2. transformers (fallback): - Uses HuggingFace transformers library - Works on Python 3.13+ - No spacy/blis dependency issues The function automatically: - Tries audiocraft first (if available) - Falls back to transformers if audiocraft fails or is not installed - Provides clear error messages if neither backend is available This allows MusicGen music generation to work on Python 3.13 without the problematic audiocraft → spacy → thinc → blis dependency chain.
Showing
Please
register
or
sign in
to comment