Skip to content

Enable Stable Audio 3 LoRA finetunes (spike + fork pin + in-app update)#67

Merged
brxs merged 4 commits into
mainfrom
brxs/44/finetunes
Jun 27, 2026
Merged

Enable Stable Audio 3 LoRA finetunes (spike + fork pin + in-app update)#67
brxs merged 4 commits into
mainfrom
brxs/44/finetunes

Conversation

@brxs

@brxs brxs commented Jun 27, 2026

Copy link
Copy Markdown
Owner

Closes the investigation for #44 and lands the pieces that make Stable Audio 3
LoRA finetunes runnable on our MLX path.

What's here

  • Spike (Spike: enable Stable Audio 3 LoRA finetunes through the MLX inference path #44): 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.
  • Fork pin: sa3-pin.jsonbrxs/stable-audio-3@36ef977, which carries the
    --lora merge-at-load support. Contributed upstream as
    Add LoRA inference support to the MLX path Stability-AI/stable-audio-3#57; revert the pin to upstream once it merges.
  • In-app update: the model manager now stamps the installed SA3 source
    (.lsdj-source.json) and shows Update available with an Update button
    when 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 check green (ruff, eslint, clippy -D warnings; backend pytest 87,
    frontend vitest 651 incl. new ModelManager tests, Rust 133 incl. new
    drift/stamp tests) and just build clean.
  • The LoRA PoC was proven end-to-end through the MLX subprocess path with a real
    public adapter (measurable output change; bit-exact bypass at strength 0).
  • The in-app Update flow was verified manually in the running app.

Risk / follow-up

🤖 Generated with Claude Code

brxs and others added 4 commits June 27, 2026 17:46
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>
@brxs brxs merged commit 50a3734 into main Jun 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant