Training locally with the full-featured NAM
The command line trainer is the full-featured option for training models with NAM. To start, you’ll want to follow the installation instructions here at Local Installation.
After completing this, you will be able to use the full-featured NAM trainer by typing
$ nam-full
from the command line.
Training
Training uses three configuration files to specify:
What data you’re training with: (
nam_full_configs/data/),What model architecture you’re using (
nam_full_configs/models/), andDetails of the learning algorithm model (
nam_full_configs/learning/).
To train a model of your own gear, you’ll need to have a paired input/output signal from it (either by reamping a pre-recorded test signal or by simultaneously recording your DI and the effected tone). For your first time, you can download the following pre-made files:
Next, make a file called e.g. data.json by copying
nam_full_configs/data/single_pair.json
and editing it to point to your audio files like this:
"common": {
"x_path": "C:\\path\\to\\input.wav",
"y_path": "C:\\path\\to\\output.wav",
"delay": 0
}
Note
If you’re providing your own audio files, then you need to provide the latency (in samples) between the input and output file. A positive number of samples means that the output lags the input by the provided number of samples; a negative value means that the output precedes the input (e.g. because your DAW over-compensated). If you’re not sure exactly how much latency there is, it’s usually a good idea to add a few samples just so that the model doesn’t need to “predict the future”!
Next, copy to e.g. model.json a file for whichever model architecture you want to
use (e.g.
nam_full_configs/models/wavenet.json
for a standalone WaveNet, or
nam_full_configs/models/wavenet_packed.json
for an example packed WaveNet), and copy to e.g.
learning.json the contents of
nam_full_configs/learning/demo.json
(for a quick demo run) or
default.json
(for something more like a normal use case).
Next, to train, open up a terminal. Activate your nam environment and call
the training script with
nam-full \
path/to/data.json \
path/to/model.json \
path/to/learning.json \
path/to/outputs
where the first three input paths are where you saved for files, and you choose the final output path to save your training results where you’d like.
Note
NAM uses
PyTorch Lightning
under the hood as a modeling framework, and you can control many of the
PyTorch Lightning configuration options from
nam_full_configs/learning/default.json.
Once training is done, a file called model.nam is created in the output
directory. To use it, point
the plugin at the file
and you’re good to go!