Enable Stable Audio 3 LoRA finetunes (spike + fork pin + in-app update)#67
Merged
Conversation
Spike findings + recommendation (docs/spike-sa3-lora.md), the trust-boundary decision (ADR-0028, extending ADR-0012), and the 0012 back-reference. Picks Path 1 — merge a LoRA adapter into the MLX DiT weights at load time, accepting .safetensors only. The PoC patch is captured in the spike doc and contributed upstream (Stability-AI/stable-audio-3#57); follow-up build issue is #66. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
sa3-pin.json -> brxs/stable-audio-3@36ef977, which carries the --lora merge-at-load support (ADR-0028). Revert repo to Stability-AI/stable-audio-3 and bump the commit once the upstream PR (Stability-AI/stable-audio-3#57) merges. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Stamp the installed SA3 source (.lsdj-source.json: repo + commit) after a fetch, and surface an in-app update when the checkout drifts from the sa3-pin.json pin (or is unstamped). `update_model` re-fetches the pinned source over the existing checkout (the existing safe backup/restore swap), rebuilds, re-warms, and re-stamps; it is SA3-only and reuses the single-flight install machinery. `model_status` gains installedSource / pinnedSource / updateAvailable, and the model manager shows "Update available" + an Update button on the SA3 row. This makes a pin bump — the LoRA fork now, the upstream revert once Stability-AI/stable-audio-3#57 lands — a one-click in-place update instead of a manual delete + reinstall. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The pin now points at the fork that carries the MLX LoRA support; reword the "upstream-track code" consequence so it no longer reads as if we ship bccf5b7, and state the revert trigger (revert to Stability-AI/stable-audio-3 once the upstream PR lands). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Closes the investigation for #44 and lands the pieces that make Stable Audio 3
LoRA finetunes runnable on our MLX path.
What's here
docs/spike-sa3-lora.md+ ADR-0028 (extends ADR-0012) —picks Path 1 (merge a LoRA into the MLX DiT at load), settles the trust
boundary (safetensors only, never pickle), and captures the PoC patch.
sa3-pin.json→brxs/stable-audio-3@36ef977, which carries the--loramerge-at-load support. Contributed upstream asAdd LoRA inference support to the MLX path Stability-AI/stable-audio-3#57; revert the pin to upstream once it merges.
(
.lsdj-source.json) and shows Update available with an Update buttonwhen the checkout drifts from the pin — so a pin bump (this fork now, the
upstream revert later) is a one-click in-place update, not a manual delete.
How it was tested
just checkgreen (ruff, eslint, clippy-D warnings; backend pytest 87,frontend vitest 651 incl. new ModelManager tests, Rust 133 incl. new
drift/stamp tests) and
just buildclean.public adapter (measurable output change; bit-exact bypass at strength 0).
Risk / follow-up
sa3-pin.jsontracks a personal fork until Grow a loop into a track: continue a pad/freeze into a full SA3 track #57 lands — the ADR and the file'snote record the revert trigger.
🤖 Generated with Claude Code