askill
create-stems

create-stemsSafety 95Repository

Audio stem separation using Demucs (4-stem or 6-stem) and optional UVR ensemble. Uses the Python API entrypoint for clean error handling. GPU-accelerated, local-first.

1 stars
1.2k downloads
Updated 3/6/2026

Package Files

Loading files...
SKILL.md

create-stems

Audio stem separation using Demucs' Python API. Default model is htdemucs_6s which splits audio into 6 sources: vocals, drums, bass, other, guitar, piano.

Usage

# 6-source separation (default)
./run.sh separate --mix song.wav --out ./stems

# Extract a specific instrument by name (auto-maps to Demucs source)
./run.sh separate --mix song.wav --out ./stems --instrument vocals
./run.sh separate --mix song.wav --out ./stems --instrument oud
./run.sh separate --mix song.wav --out ./stems --instrument piano

# Raw two-stems mode (if you know the Demucs source name)
./run.sh separate --mix song.wav --out ./stems --two-stems guitar

# 4-source with VRAM control
./run.sh separate --mix song.wav --out ./stems --model htdemucs --segment 12

# Quality mode (GPU recommended)
./run.sh separate --mix song.wav --out ./stems --shifts 2

# MP3 output
./run.sh separate --mix song.wav --out ./stems --mp3

# Low-VRAM mode
./run.sh separate --mix song.wav --out ./stems --segment 8 --no-cuda-mem-caching

Instrument Mapping

Use --instrument with natural names. The skill maps them to the closest Demucs source:

InstrumentMaps to (6s)Notes
vocals, voice, singingvocals
drums, percussiondrums
bass, upright bass, bass guitarbass
guitar, oud, lute, banjo, mandolin, sitar, ukulele, bouzoukiguitarPlucked strings
piano, keyboard, keys, organ, synth, accordion, harpsichordpianoKeyboard family
violin, cello, trumpet, sax, flute, strings, brass, woodwindotherOrchestral/misc

This means an agent can say --instrument oud and the skill determines the best extraction path (--two-stems guitar on htdemucs_6s).

Models

ModelSourcesNotes
htdemucs_6s6 (vocals/drums/bass/other/guitar/piano)Default. Best for full separation.
htdemucs4 (vocals/drums/bass/other)Faster. Guitar+piano in "other".
htdemucs_ft4 (fine-tuned)Higher quality 4-stem.

VRAM Tuning

FlagEffect
--segment NSplit size (seconds). Smaller = less VRAM. Try 8-12 for 8GB cards.
--overlap FWindow overlap (default 0.25). Reduce for speed.
--shifts NRandom time-shift averaging. Higher = better quality, slower.
--jobs NParallel jobs. Increases RAM proportionally.
--no-cuda-mem-cachingSets PYTORCH_NO_CUDA_MEMORY_CACHING=1. Helps with very low VRAM.

Output Structure

<out_dir>/
  htdemucs_6s/
    <track_name>/
      vocals.wav
      drums.wav
      bass.wav
      other.wav
      guitar.wav
      piano.wav
  manifest.json

Sanity Checks

./sanity.sh        # Full environment check

Hardware Requirements

ComponentMinimumRecommended
VRAM4GB (with --segment 8)8GB+
RAM8GB16GB+
Storage5GB (model cache)10GB+

Integration

Used by:

  • create-music - stem separation step in music creation pipeline
  • discover-music - youtube-stems command delegates here
  • learn-artist - vocal/instrument extraction for RVC training

References

Install

Download ZIP
Requires askill CLI v1.0+

AI Quality Score

95/100Analyzed 2/24/2026

High-quality technical reference skill for audio stem separation using Demucs. Comprehensive coverage with instrument mapping tables, model comparisons, VRAM tuning guidance, hardware requirements, and integration examples. Well-structured with YAML metadata, clear usage examples, and actionable commands. Referenced by other skills indicating good reusability. Publicly usable with no internal-only indicators.

95
90
92
95
95

Metadata

Licenseunknown
Version-
Updated3/6/2026
Publishergrahama1970

Tags

apici-cdgithub