Book a call
Choose how to read this case

Client workBuilt for an external organization under a paid engagement.

Architecture, system rules, decisions & documented evidence.

← All workProduct case file / 009
Audio / AIOn-device inferenceWebGPUBilingual

STEMFORGE / SAKANWAVE

Stem. Forge

Split a track into vocals, drums, bass and other — inside the browser tab, on the listener's own machine. A server exists, but it is the opt-in fast path, not the default.

System snapshotMDP / AUDIO

04

Stems per track

05

Runtime dependencies

03

Separation engines

00

Audio uploaded by default

Data path

Your file → ORT / WebGPU → 04 stems

Dependency count is the package.json's own runtime list; engine count comes from the separation hooks in lib/separation.

Role: Product & buildDomain: Audio / ML tooling2026

Have a similar product or workflow in mind?

Tell me what you need and we can define deliverables, timing and cost. A finished brief is optional.

Discuss your project →
StemForge — four separated stems in colour
Four stems, four colours — waveform detailON-DEVICE / 2026

01 / The challenge

Stem separation usually means uploading your master to someone else's GPU.

Separating a mix into vocals, drums, bass and other is now a solved problem — but almost every hosted tool solves it by asking you to upload the file first. For an unreleased track, that is a rights decision disguised as a button.

The other half of the problem is ordinary and worse: the round trip. Upload, queue, wait, download four files, re-import them. The interesting moment — hearing one part alone — arrives minutes after the idea did.

StemForge starts from the opposite end: run the model in the tab. The file never leaves the machine unless the user explicitly chooses the fast path, and the result is playable the moment the last chunk decodes.

Core decision: the private path is the default, and the fast path is opt-in. A server that is faster but requires an upload is offered, not assumed.

02 / Architecture

Three engines behind one player.

The hooks live in lib/separation and all conform to one provider shape, so the page's mode state — not a class hierarchy — picks the engine.

01

On-device (default)

useSeparation · separationWorker · webgpuAdapterInfoPolyfill

onnxruntime-web on WebGPU, with a polyfill for adapter info and a worker so decoding never blocks the interface.

02

Hugging Face / fallback

useHuggingFaceSeparation · useFallback · modelSource

An alternative model source and a fallback hook, so a machine without WebGPU still produces stems instead of dead-ending.

03

Server (opt-in)

server/app.py · useServerSeparation

htdemucs_ft on a warm Modal CUDA container via a short-lived server-minted token — the secret never reaches the browser.

04

Player & mixdown

useStemPlayer · mixStems · stemColors

Per-stem mute/solo, colour identity per stem, and a mixdown path that recombines the four into a single file.

Your file

Stays on the device

→

ORT / WebGPU

Worker thread

→

04 stems

Coloured, playable

The Modal path is a parallel branch, not a step: choosing it is the only way a file leaves the browser.

03 / Product decisions

Privacy as a default, speed as a choice.

01↗

Inference in the tab

onnxruntime-web runs the model on the visitor's GPU. For an unreleased track, 'the file never left my machine' is the feature, not a footnote.

02↗

The server is opt-in, and token-gated

Fast Mode calls a Modal endpoint with a short-lived token minted server-side, reusing the same shared secret as the rest of the app. The API key never ships to the browser.

03↗

No class hierarchy for engines

Every engine is a top-level hook conforming to one shape. React's rules of hooks make a dynamic provider object pointless — the page's mode state is the honest discriminant.

04↗

Fallbacks are product, not error handling

A machine without WebGPU is a supported machine, not a failure: the fallback and Hugging Face paths exist so the tool still returns stems.

05↗

Assets are copied before every build

copy-ort-assets runs on postinstall, predev and prebuild. It is a small detail that prevents the classic wasm-404-only-in-production bug.

06↗

Licensing is disclosed in the UI

The TRIA path's pretrained weights are CC BY-NC-SA, and the code treats that as a user-facing disclosure rather than a hidden constraint — the feature simply does not render when unset.

05 / Evidence

What the repository actually assembles.

05

Runtime dependencies total

from repo

03

Distinct separation engines

from repo

04

Stems with individual colour

from repo

AR/EN

Locales with a locale cookie

from repo

Five runtime dependencies: @vercel/blob, next, onnxruntime-web, react, react-dom. Everything else is Next's own toolchain.

No accuracy, latency or user numbers are claimed here — the repository contains no benchmark for any of them, and its README is still the framework default.

The Modal backend is Python (server/app.py, tria_app.py) and is documented as an optional speed path; it is not required to produce stems.

06 / Technology stack

Five dependencies and a worker.

Next.js 16React 19onnxruntime-webWebGPUWeb WorkersModal (CUDA)htdemucs_ftPython@vercel/blob

Small dependency surface by design: a model runtime, a framework, and blob storage. The rest is the platform.

HAND-OFF / 009

Your master stays yours.

Next: batch separation for an EP, and a session that remembers a split across reloads without ever persisting the audio.

Switch Reading Lens · 02

Want the practical business breakdown—what this project does, how it runs, and its core advantages?

Have a similar product or workflow in mind?

Tell me what you need and we can define deliverables, timing and cost. A finished brief is optional.

Discuss your project →

NEXT CASE ↳ FROM THE FILES

Code & Canvas — Platform