v1.7.1 release: GuitarML Proteus/NeuralPi model importer

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-08-01 20:31:38 -07:00
parent 3e33f09e07
commit ea0aa84ca7
6 changed files with 330 additions and 8 deletions
+18 -2
View File
@@ -2683,5 +2683,21 @@ let model = NeuralAmpModel(hiddenSize: 20, residual: true,
let amp = LSTMAmp(input: di, model: model)
```
An importer for external NAM `.nam` / GuitarML Proteus JSON model files onto `NeuralAmpModel`
is a planned follow-up (it maps those schemas onto the documented weight layout).
GuitarML Proteus / NeuralPi JSON models load via `ProteusModelImporter` (below). A binary NAM
`.nam` importer remains a planned follow-up.
### ProteusModelImporter
Imports a GuitarML **Proteus / NeuralPi** model JSON (single-layer PyTorch LSTM, `unit_type`
`"LSTM"`, `input_size`/`output_size` 1) into a `NeuralAmpModel` for `LSTMAmp`. The tensors flatten
straight onto `NeuralAmpModel`'s layout (PyTorch gate order i,f,g,o); `skip == 1` → `residual`.
Unsupported topologies or inconsistent tensor shapes throw.
```swift
let data = try Data(contentsOf: modelURL) // a user-supplied .json
let model = try ProteusModelImporter.model(fromProteusJSON: data)
let amp = LSTMAmp(input: di, model: model)
```
> Model files are **not** redistributed with Lyrebird — this only parses a file the user
> supplies. GuitarML models are GPL-licensed; keep them out of MIT-licensed bundles.