Tutorial · Tutorial · Migration
A Real Demucs Alternative: Same Quality, No GPU
HTDemucs is the open-source quality king — and a small infrastructure project to run in production. If your goal is the output, not the DevOps, this tutorial swaps the GPU setup for an API call.
Step 1 — What you're replacing
A typical self-hosted Demucs setup is: NVIDIA GPU machine, CUDA + PyTorch environment, model checkpoints, a job queue, retry logic, monitoring, and periodic retraining/update work. The output is 4 stems: vocals, drums, bass, other.
Step 2 — Get the API key
- Sign up (free tier included)
- Copy the key from the dashboard
- pip install requests (or the mlslabs SDK)
Step 3 — One song, same quality
import requests, time
API = "https://api.mlslabs.io/v1"
HEADERS = {"X-API-Key": "YOUR_API_KEY"}
job = requests.post(
API + "/vocal-separator/jobs",
headers=HEADERS,
json={
"input": "s3://bucket/song.mp3",
"output": "s3://bucket/stems/",
"mode": "music", # HTDemucs-family model
"tracks": ["vocals", "drums", "bass", "other"],
},
).json()
job_id = job["job_id"]
while True:
st = requests.get(API + "/vocal-separator/jobs/" + job_id, headers=HEADERS).json()
if st["status"] == "done":
print(st["output"])
break
if st["status"] == "failed":
raise SystemExit("failed — credits auto-refunded")
time.sleep(2)Step 4 — Bring your batch
The same call scales to a library: submit N jobs, get N webhooks. That is the part self-hosted Demucs leaves to you — queue, retries, monitoring — already built.
Migration checklist
- Replace the CLI invocation with the API call
- Point output URLs to your object storage
- Wire webhooks into your existing job tracker
- Delete the GPU box (or repurpose it)
FAQ
Common questions
Is the API quality really comparable to HTDemucs?
Our music mode is trained in the same model family, with per-mode tuning. A/B test on your own audio — the free tier is there for exactly that.
What about on-prem data rules?
The hosted API moves media to object storage. If data must stay on-prem, self-hosted Demucs remains the right answer.
Can I keep my existing queue and just swap the worker?
Yes — the API is a drop-in worker: submit job, await webhook, fetch output. Most teams replace their custom worker in an afternoon.
Keep exploring
Related guides
Vocal Separator API
Isolate vocals or instrumentals from speech and music mixes.
Learn moreSpleeter vs Demucs
Spleeter vs Demucs (HTDemucs) — the two open-source separation standards compared on quality, speed, GPU/CPU needs,...
Read guideVocal Separation API vs Demucs
Demucs is excellent open-source separation — if you have a GPU. We compare quality, speed, cost, and ops burden vs...
Read guide