Stem CacheΒΆ
Demucs stem separation is slow on CPU (5β15 min for a 40-min file). The stem cache ensures it only runs once per file.
How the cache key worksΒΆ
flowchart LR
A[Input file] --> B[Read first 8 MiB]
B --> C[SHA-256 hash]
C --> D[First 16 hex chars]
D --> E["~/.praisonai/editor/.demix_cache/{hash}/"]
E --> F{vocals.wav + no_vocals.wav\nboth exist?}
F -->|Yes| G[β
Reuse β skip Demucs]
F -->|No| H[Run Demucs β save]
Cache locationΒΆ
~/.praisonai/editor/.demix_cache/
βββ a78a770eb2572ef6/
βββ vocals.wav (424 MB)
βββ no_vocals.wav (424 MB)
Timing exampleΒΆ
| Run | Time |
|---|---|
| First run (40-min file, CPU) | ~10 min |
| Second run (cache hit) | ~8 sec |