metadata
title: Bytley Stems
emoji: ποΈ
colorFrom: purple
colorTo: pink
sdk: docker
app_port: 7860
pinned: false
Bytley Demucs stem-separation backend
FastAPI service that splits a song into stems with Demucs (htdemucs) on the free Hugging Face CPU tier. Same deployment pattern as the PDFβWord Space.
Endpoints
GET /β health:{ok, service, model, maxMb}POST /separate?mode=stemsβ multipartfileβ ZIP ofvocals.mp3, drums.mp3, bass.mp3, other.mp3POST /separate?mode=karaokeβ β ZIP ofinstrumental.mp3, vocals.mp3
Deploy (Hugging Face Spaces)
- huggingface.co β New Space β name
bytley-stemsβ SDK: Docker β CPU basic (free). - Upload
app.py,requirements.txt,Dockerfile, thisREADME.md. - First build takes a while (torch + baked model β 1β2 GB image). Watch Build logs.
- Health check:
https://<user>-bytley-stems.hf.space/β{"ok":true,...}. - Put that URL in
src/consts.tsβdemucsApi: "https://<user>-bytley-stems.hf.space/separate". - Optional: Space secret
BYTLEY_TOKEN+ same value inconsts.tsdemucsToken. - Add the health URL to your cron pinger (cron-job.org / UptimeRobot, every 30 min) so the Space never hits the 48 h sleep.
Notes
- A 3β4 min song takes roughly 4β10 min on the free 2-vCPU tier. One job at a time.
- Uploads are processed in a temp dir and deleted immediately after the response.
- Input capped at 30 MB / 10 minutes of audio.