A VS Code project for training RAVE models and exploring their latent spaces, with a favorites system for saving discoveries.
Option A: Conda (recommended)
conda env create -f environment.yml
conda activate rave-expOption B: pip
# First install PyTorch for your system from https://pytorch.org
pip install torch torchaudio
# Then install other dependencies
pip install -r requirements.txtpython -c "import rave; print('RAVE OK')"
python -c "import torch; print(f'PyTorch OK, CUDA: {torch.cuda.is_available()}')"Place your audio files in data/raw/audio/, then preprocess:
rave preprocess --input_path data/raw/audio --output_path data/processed/audioOr use VS Code task: RAVE: Preprocess Dataset
# Standard v2 model (needs ~16GB GPU memory)
rave train --config v2 --db_path data/processed/audio --out_path experiments --name my_model
# Smaller model for less GPU memory (~8GB)
rave train --config v2_small --db_path data/processed/audio --out_path experiments --name my_modelOr use VS Code tasks: RAVE: Train v2 or RAVE: Train v2_small
Monitor training with TensorBoard:
tensorboard --logdir experiments --port 6006After training (or during, from a checkpoint):
rave export --run experiments/my_model --streamingThis creates a .ts file in your run directory. Copy it to models/exported/ for exploration.
CLI mode:
python scripts/explore_latent.py --model models/exported/my_model.ts --interactiveJupyter:
Open notebooks/02_latent_exploration.ipynb
rave-experiments/
├── configs/ # Configuration files
├── data/
│ ├── raw/audio/ # Your original recordings
│ └── processed/ # Preprocessed training data
├── models/
│ ├── checkpoints/ # Training checkpoints
│ └── exported/ # Exported .ts models
├── experiments/ # Training runs and logs
├── favorites/ # Saved latent discoveries
│ ├── audio/ # Generated audio from favorites
│ └── sessions/ # Exploration session logs
├── notebooks/ # Jupyter notebooks
├── src/ # Source code
│ └── exploration/ # Latent explorer and favorites
└── scripts/ # CLI entry points
Save interesting sounds during exploration:
- Save: Press 's' in interactive mode or click "Save Favorite" in notebook
- Rate: Assign 1-5 star ratings
- Tag: Organize with custom tags
- Interpolate: Create morphs between favorites
- Export: Generate sample packs from your discoveries
# List favorites
favorites.list_favorites(min_rating=4, sort_by='rating')
# Interpolate between two favorites
path = favorites.interpolate_favorites("abc123", "def456", steps=10)
# Export all 5-star favorites
favorites.export_favorites_audio("my_sample_pack/", min_rating=5)| Config | Description | GPU Memory |
|---|---|---|
| v1 | Original model | ~8GB |
| v2 | Improved quality, faster | ~16GB |
| v2_small | Smaller receptive field | ~8GB |
| v3 | Style transfer features | ~32GB |
| discrete | Like SoundStream/EnCodec | ~18GB |
Combine with modifiers:
rave train --config v2 --config causal # Low latency
rave train --config discrete --config causal # Discrete + causalFor HPD-20 or other MIDI controllers:
# List available MIDI ports
python scripts/explore_latent.py --list-midi
# Connect to a specific port
python scripts/explore_latent.py --model my_model.ts --midi-port "HPD-20" --interactiveIn interactive mode, map CCs to dimensions:
>>> midi 74 0 # Map CC#74 (D-BEAM) to dimension 0
>>> midi 1 1 # Map CC#1 (mod wheel) to dimension 1
- Start small: Use
v2_smallfor initial experiments - Monitor training: Check TensorBoard for loss curves and audio samples
- Save early, save often: The favorites system is non-destructive
- Explore systematically: Use dimension sweeps to understand each latent dimension
- Rate your favorites: Makes it easier to find the good ones later