Description
There are two sequential installation and runtime bugs when attempting to use the separation runtime on an Intel Mac (x86_64) due to upstream dependency changes dropping support for this architecture.
1. Installation Failure (llvmlite)
Because PyTorch dropped macOS x86_64 support starting with version 2.3, pip automatically backtracks and attempts to install an older version of audio-separator (e.g. 0.24.1) that doesn't strictly require torch>=2.3. During this process, pip tries to install llvmlite. However, llvmlite stopped releasing precompiled macOS x86_64 wheels starting with version 0.46.0. Without a prebuilt wheel, pip attempts to compile it from source, failing because CMake and LLVM are missing.
Installing audio-separator for CPU only failed: /runtime/bin/python', '/private/var/folders/.../ffi/build.py']' returned non-zero exit status 1.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for llvmlite
2. Runtime Crash (--list_format=json)
If the user manages to resolve the dependency conflict (e.g., by constraining llvmlite<0.46.0 as proposed below), pip successfully installs audio-separator==0.24.1. However, rx3-toolkit then crashes immediately when attempting to retrieve the model list because audio-separator 0.24.1 does not support the --list_format=json argument:
Model list unavailable: The model list could not be retrieved: ... audio-separator: error: unrecognized arguments: --list_format=json
Steps to Reproduce
- Run
rx3-toolkit on an Intel Mac (or an Apple Silicon Mac running in Rosetta/x86_64 mode).
- Attempt to provision/install the separation runtime. The installation fails.
- Fix the installation manually, then try to open the separation UI -> Crash on
--list_format=json.
Proposed Fix
We can resolve both issues gracefully for Intel Mac users with two small changes:
Fix 1: Constrain llvmlite for x86_64 macOS
# tools/rx3_stems/provisioning.py
SUPPORT_PACKAGES = [LIBROSA_PIN, "imageio-ffmpeg"]
if sys.platform == "darwin" and platform.machine() == "x86_64":
# llvmlite >= 0.46.0 lacks macOS x86_64 wheels.
# Force < 0.46.0 to avoid source compilation without CMake/LLVM.
SUPPORT_PACKAGES.append("llvmlite<0.46.0")
SUPPORT_PACKAGES = tuple(SUPPORT_PACKAGES)
Fix 2: Remove --list_format=json
Since older versions of audio-separator (like 0.24.1) output JSON by default and do not recognize the --list_format argument, we should remove it from the subprocess call to maintain compatibility.
# tools/rx3_stems/separation.py (around line 446)
result = subprocess.run(
[str(runtime.separator), "--list_models",
f"--model_file_dir={runtime.models}", "--log_level=error"],
capture_output=True, text=True,
env=runtime.subprocess_environment(),
)
Impact & Tradeoffs
By forcing Intel Macs to use < 0.46.0 of llvmlite (and consequently audio-separator ~0.24.1), users will miss out on the latest optimizations in the audio-separator CLI. However, this is an acceptable and necessary tradeoff because:
- Version
0.24.1 still fully supports the high-quality core architectures needed by rx3-toolkit (MDX, Demucs, VR, and MDXC/Roformer).
- It is currently the only automated way to allow Intel Mac users to use the toolkit without forcing them to manually compile LLVM/CMake toolchains from scratch (which most end-users cannot do).
System Info
- OS: macOS (Intel x86_64)
- Python Version: >= 3.10
- rx3-toolkit Version: 0.5.2
Description
There are two sequential installation and runtime bugs when attempting to use the separation runtime on an Intel Mac (
x86_64) due to upstream dependency changes dropping support for this architecture.1. Installation Failure (
llvmlite)Because PyTorch dropped macOS
x86_64support starting with version2.3,pipautomatically backtracks and attempts to install an older version ofaudio-separator(e.g.0.24.1) that doesn't strictly requiretorch>=2.3. During this process,piptries to installllvmlite. However,llvmlitestopped releasing precompiled macOSx86_64wheels starting with version0.46.0. Without a prebuilt wheel,pipattempts to compile it from source, failing because CMake and LLVM are missing.2. Runtime Crash (
--list_format=json)If the user manages to resolve the dependency conflict (e.g., by constraining
llvmlite<0.46.0as proposed below),pipsuccessfully installsaudio-separator==0.24.1. However,rx3-toolkitthen crashes immediately when attempting to retrieve the model list becauseaudio-separator0.24.1does not support the--list_format=jsonargument:Steps to Reproduce
rx3-toolkiton an Intel Mac (or an Apple Silicon Mac running in Rosetta/x86_64 mode).--list_format=json.Proposed Fix
We can resolve both issues gracefully for Intel Mac users with two small changes:
Fix 1: Constrain
llvmliteforx86_64macOSFix 2: Remove
--list_format=jsonSince older versions of
audio-separator(like0.24.1) output JSON by default and do not recognize the--list_formatargument, we should remove it from thesubprocesscall to maintain compatibility.Impact & Tradeoffs
By forcing Intel Macs to use
< 0.46.0ofllvmlite(and consequentlyaudio-separator~0.24.1), users will miss out on the latest optimizations in theaudio-separatorCLI. However, this is an acceptable and necessary tradeoff because:0.24.1still fully supports the high-quality core architectures needed byrx3-toolkit(MDX, Demucs, VR, and MDXC/Roformer).System Info