Skip to content
Other

SCNet (base) Core ML

разделение музыки на дорожки на устройствах Apple

2 min readupdated

Модель разделяет стерео-аудиозапись на четыре отдельных стема (изолированные дорожки): ударные, бас, вокал и остальные инструменты. Это конвертация оригинальной нейросети SCNet (Sparse Compression Network) в формат Core ML от автора simopa71, созданная для локальной работы без интернета в iOS-приложении Preso!. В отличие от базового PyTorch-чекпоинта, здесь внутренние преобразования Фурье по оси времени заменены на константные матрицы DFT для запуска на Apple-устройствах. Релиз пригодится iOS- и macOS-разработчикам музыкальных приложений, диджей-инструментов и аудиоредакторов.

Ключевые особенности

  • Два варианта точности: SCNet_fp16.mlpackage весом около 23 МБ и SCNet_fp32.mlpackage весом около 45 МБ.
  • Высокая точность переноса весов относительно оригинала на PyTorch: 109 дБ для fp32 и 59 дБ для fp16.
  • Быстрая обработка: на Mac с чипом Apple M1 (GPU, fp16) 30 секунд аудио обрабатываются примерно за 2 секунды.
  • Лицензия MIT, позволяющая свободно распространять и использовать сконвертированные веса с указанием авторства.

Что можно сделать

  • Встроить локальное извлечение вокала или минусовок в iOS- и macOS-приложения без отправки файлов на сервер.
  • Использовать модель в инструментах для ремиксов и практических занятий музыкантам для выделения партий баса или ударных.

Пример

Модель принимает на вход готовые спектрограммы (STFT с окном 4096 и шагом 1024 для стерео 44.1 кГц) тензором формы (1, 4, 2049, 476), что соответствует фиксированному 11-секундному фрагменту. На выходе возвращается тензор (1, 16, 2049, 476) с четырьмя дорожками в порядке: ударные, бас, прочее, вокал — обратное преобразование (iSTFT) и склейку чанков с перекрытием 25% выполняет вызывающий код.

ПодробнееКачество на 12 тестовых фрагментах MUSDB18 (global SDR): вокал — 10.0 дБ, ударные — 9.2 дБ, бас — 7.6 дБ, остальное — 5.3 дБ.
Ограничения: в iOS Simulator версия fp16 возвращает нули (работает только fp32), на macOS работают обе.
Скорость работы на iPhone и Apple Neural Engine не замерялась.
Оригинальная модель обучена на датасете MUSDB18-HQ (предназначен для исследований и обучения).
Discuss Telegram 1 20

Will it run?

Working out the memory needs

The bot is still collecting this model's weight sizes; the estimate will appear here in a few minutes. Meanwhile you can rent a GPU with headroom.

Massed ComputeOpen Massed Compute

Run it on Massed Compute

The script downloads the model to the rented machine. How to run it is in the model card.

  1. 1. Rent a machine with a fitting GPU

    Open Massed Compute
  2. 2. Paste the script into the machine's terminal

    Connect over SSH (the Massed Compute panel shows the command) or open a terminal on the machine's desktop.

    HF_TOKEN / CIVITAI_TOKENThe script starts with token lines: paste yours between the quotes. The Hugging Face token is for gated models, the Civitai one for Civitai models.

    # simopa71/preso-stems
    mkdir -p ~/models
    curl -LsSf https://astral.sh/uv/install.sh | sh
    source "$HOME/.local/bin/env"
    uv tool install "huggingface_hub[cli]"
    hf download simopa71/preso-stems --local-dir ~/models/preso-stems
    # The model is in ~/models. How to run it is in the model card (link above).
    Add more LoRAs to preso-stems
  3. 3. Use it

    The model is in ~/models. How to run it is in the model card (link above).

Stop the machine in the panel when you are done: it bills by the minute while it runs.

How to speed it up

Picked for this model type. Choose your hardware above to see what fits you exactly.

  • FlashAttention 44.0.0b40from November 18, 2026new release

    fastest exact attention on B200

    Kernels for Blackwell (beta). Exact attention without quantisation — fine for everything, LLMs included.

    How to enable: pip install flash-attn-4; vLLM and SGLang pick it up themselves.

    Earlier generations (2)
    • FlashAttention 3 — The Hopper (H100/H200) version with FP8.
    • FlashAttention 2 — The standard for RTX 30/40/50 and A100: exact attention without the memory cost of long contexts.
  • torch.compile2.15.0from October 28, 2026new release

    10–30% for free

    Compiles the model for your GPU. Slower first run, faster afterwards.

    How to enable: model = torch.compile(model); in ComfyUI the TorchCompileModel node.

Model family

New posts about versions of preso-stems (quants, finetunes, LoRAs) will show up under the bell.

No known relatives of this model yet. All derivatives on Hugging Face

About the model

simopa71/preso-stems
Author
simopa71
Category
Other
Released
Posted

On NeyroLearn

Hugging Face

201

Ask AI about this model

Answered by Gemini 4 · the chat is kept only in this tab

Comments