Add Supertonic FP16 MLX export and native runner - #22063
Open
seyeong-han wants to merge 3 commits into
Open
Conversation
seyeong-han
requested review from
kirklandsign and
larryliu0820
as code owners
August 23, 2026 14:30
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/22063
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 39c750c with merge base cff6f4d ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
seyeong-han
force-pushed
the
supertonic/01-runtime
branch
from
August 23, 2026 14:34
a31b87f to
27f7331
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add an ExecuTorch MLX implementation of Supertonic 3, Supertone's on-device multilingual TTS model.
The Python model files translate the published ONNX architecture and weights into an ExecuTorch PTE. They are needed only when creating the PTE; the C++ runner does not use Python or the source ONNX model files.
This PR supports one-shot, batch-1, five-step synthesis on macOS arm64. It does not include model weights, generated PTEs, WAVs, a persistent server, benchmarks, or application integration.
What to review
The 49 files do not need equal review depth.
1. Create the PTE (Python, export time only)
examples/models/supertonic/loaders/checkpoint_loader.pyexamples/models/supertonic/model/duration_predictor.pyexamples/models/supertonic/model/text_encoder.pyexamples/models/supertonic/model/vector_estimator.pyexamples/models/supertonic/model/vocoder.pyexamples/models/supertonic/export/common.pyexamples/models/supertonic/export/export_supertonic.pyexamples/models/supertonic/source_transformations/mlx.pyThese files define the four Supertonic stages in PyTorch, copy and convert the ONNX weights, apply MLX-compatible graph rewrites, and export four PTE methods:
duration_predictor,text_encoder,vector_estimator, andvocoder.Review the layer/weight mapping, equivalent outputs, dynamic bounds, FP16 conversion, metadata, and MLX delegation. The highest-signal tests are
test_checkpoint_loader.py,test_stage_parity.py, andtest_mlx_pipeline.py.2. Run the PTE (C++)
examples/models/supertonic/runtime/supertonic_runner.cppexamples/models/supertonic/runtime/text_processor.cppexamples/models/supertonic/runtime/style_loader.cppexamples/models/supertonic/runtime/wav_writer.cppexamples/models/supertonic/runtime/main.cppThese files load the PTE, call its four methods, preprocess and chunk text, run five generation steps, trim the waveform, and write a WAV file. Review the PTE compatibility checks, Unicode handling, tensor flow, and output validation.
The highest-signal tests are
examples/models/supertonic/runtime/tests/supertonic_runtime_test.cppandexamples/models/supertonic/runtime/tests/run_integration.cmake.3. Build and CI
examples/models/supertonic/CMakeLists.txtexamples/models/supertonic/CMakePresets.json.github/workflows/mlx.ymlexamples/models/supertonic/README.mdexamples/models/supertonic/NOTICEReview the macOS arm64 restriction, MLX runtime files, pinned-asset CI flow, usage, and licensing. The remaining unit tests, package files, and root README/Makefile entries are support changes that can be skimmed.
Runtime files
After export, synthesis needs only
supertonic_runner,mlx.metallib, the exported PTE,unicode_indexer.json, and one voice-style JSON file.Validation
45.9 ms, RTF0.0244(40.9xreal time).0.999603; SQNR:30.95 dB.Provenance
7e2804f96016a7028cb1ed627353c61c1e9dd281(MIT).Supertone/supertonic-3at3cadd1ee6394adea1bd021217a0e650ede09a323(BigScience Open RAIL-M).