Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 0.1.15 instead.

pymss-core

中文文档

Core model, configuration, and checkpoint package for music source separation.

pymss-core is the shared low-level package for higher-level projects such as pymss inference and pymsst training. It contains model definitions, configuration loading, and checkpoint compatibility helpers. It intentionally does not include inference DSP pipelines, chunked demixing, audio file I/O, model downloads, catalog management, CLI, HTTP server, WebUI, datasets, losses, or training loops.

Install

pip install pymss-core

For local development:

uv sync --dev

Optional MLX backend on Apple Silicon:

pip install "pymss-core[mlx]"

Public API

from pymss_core import (
    clear_model_runtime_caches,
    get_model_from_config,
    load_config,
    load_model_weights,
)

model, config = get_model_from_config("bs_roformer", "config.yaml")
load_model_weights(model, "model.ckpt", model_type="bs_roformer", strict=True)

model.eval()
  • Use get_model_from_config("auto", "config.yaml") to detect the architecture from YAML. detect_model_type(config) exposes the same detection for an already loaded configuration. Unknown or conflicting architectures raise ModelTypeDetectionError (a RuntimeError subclass); an explicit model type overrides detection.
  • bs_roformer also loads BS PolarFormer checkpoints when the matching YAML sets model.use_pope: true.

After inference has finished, clear model-owned derived caches before releasing the model:

clear_model_runtime_caches(model)

Cleanup preserves parameters and registered buffers. It calls module-owned clear_runtime_cache() hooks and releases known inference-cache references. If a hook fails, cleanup continues through the remaining modules before re-raising the first error.

Process-wide shared MLX caches, including overlap-add indices and Hann windows, and backend allocator caches are managed separately. They are outside the scope of this model-level cleanup.

Package Boundary

Included:

  • YAML config loading with AttrDict
  • PyTorch model definitions under pymss_core.modules
  • Optional MLX backend implementations for supported model forward paths
  • Model factory: get_model_from_config(model_type, config_path)
  • Checkpoint helpers for common MSS checkpoint containers
  • Cleanup for model-owned inference caches
  • Small model-internal DSP math needed to construct model structures
  • VR network structures and VR model parameter JSON files

Excluded:

  • Audio file decoding/encoding
  • Resampling, preprocessing, and full inference DSP pipelines
  • Tensor-level chunked demixing runtime
  • Model catalog, aliases, downloads, and model-file cache management
  • CLI, server, WebUI, and endpoint schemas
  • Dataset, augmentation, loss, metrics, and trainer code
  • Any default dependency on MLX, Librosa, tqdm, Lightning, FastAPI, Uvicorn, PyAV, WandB, or training extras

Repository Roles

pymss-core
  shared model/config/checkpoint layer

pymss
  user-facing inference package built on pymss-core, with audio I/O and demix

pymsst
  training package built on pymss-core, with training data/loss/runtime code

Metadata

Release files for pymss-core 0.1.13

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pymss-core 0.1.13
File Size Uploaded Provenance Actions
pymss_core-0.1.13.tar.gz 122.2 kB With provenance Details for pymss_core-0.1.13.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pymss-core 0.1.13
File Interpreter ABI Platform Actions
pymss_core-0.1.13-py3-none-any.whl Python 3 none any Details for pymss_core-0.1.13-py3-none-any.whl

Total release size: 271.5 kB

Release files / pymss_core-0.1.13.tar.gz

Download URL pymss_core-0.1.13.tar.gz
Size 122.2 kB
Tags Source
SHA-256 checksum
How to use checksums
34197149d0216633d8f7d5c68c7e9b838d04c590d13396403f1b832d4d4cca4c
BLAKE2b-256 checksum
How to use checksums
cb74d288ef50a9776b1775c76af00084b24d7a33e72627254d8c4587d4b161c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.

Transparency log

Release files / pymss_core-0.1.13-py3-none-any.whl

Download URL pymss_core-0.1.13-py3-none-any.whl
Size 149.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b9bf313c358424198648ea8c2b265b142004bc334c3210901319b0b12f8ad685
BLAKE2b-256 checksum
How to use checksums
b6a979b7b3c2c237105ca68872178d7dc219119bea1b84d217b74573ecf47d3f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.

Transparency log

Security for pymss-core 0.1.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pymss_core-0.1.13.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page