Skip to content

Disable JIT compilation for Numba - #1020

Open
boessu wants to merge 1 commit into
jamiepine:mainfrom
boessu:patch-2
Open

Disable JIT compilation for Numba#1020
boessu wants to merge 1 commit into
jamiepine:mainfrom
boessu:patch-2

Conversation

@boessu

@boessu boessu commented Aug 9, 2026

Copy link
Copy Markdown

Fix librosa/numba caching crash on model load

Problem

Loading TTS models that depend on librosa (e.g. Qwen3-TTS) fails with:

RuntimeError: cannot cache function '__o_fold': no locator available for file
'/usr/local/lib/python3.11/site-packages/librosa/core/notation.py'

This is not a filesystem permissions issue — NUMBA_CACHE_DIR=/tmp/numba_cache
(already set in this file) is being picked up correctly, and numba successfully
caches other functions in the same run (verified: core_* and librosa_* cache
directories are created and writable before the crash). The failure is specific
to __o_fold, a double-underscore-prefixed function — numba's cache locators
have a known inability to resolve a cache path for this kind of name-mangled/
private function (see e.g. numba/numba#9668, numba/numba#4908), independent of
directory permissions.

Fix

Add NUMBA_DISABLE_JIT=1 to disable numba's JIT compilation entirely for the
container process:

environment:
  - LOG_LEVEL=info
  - NUMBA_CACHE_DIR=/tmp/numba_cache
  - NUMBA_DISABLE_JIT=1

Trade-off

The handful of numba-accelerated helper functions in librosa (note-name
conversion, some signal-processing utilities) run as plain interpreted Python
instead of JIT-compiled machine code — measurably slower per-call, but this
only affects small pre/post-processing steps in the audio pipeline, not the
actual TTS model inference (which runs entirely through Torch/ROCm on GPU and
has no numba dependency). Not noticeable in practice for typical usage.

Verification

docker-compose -f docker-compose.yml -f docker-compose.rocm.yml up -d --force-recreate
docker-compose exec voicebox python3 -c "from qwen_tts import Qwen3TTSModel; print('OK')"

Model download and load now complete without the RuntimeError.

Summary by CodeRabbit

  • Bug Fixes
    • Improved Voicebox container compatibility by disabling just-in-time compilation at runtime.

Fix librosa/numba caching crash on model load
@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 66f18bf7-ad61-4510-94cc-213edbf55342

📥 Commits

Reviewing files that changed from the base of the PR and between 51f49de and 94b162d.

📒 Files selected for processing (1)
  • docker-compose.yml

📝 Walkthrough

Walkthrough

The Docker Compose configuration adds NUMBA_DISABLE_JIT=1 to the Voicebox container environment.

Changes

Voicebox runtime configuration

Layer / File(s) Summary
Disable Numba JIT
docker-compose.yml
The Voicebox service sets NUMBA_DISABLE_JIT=1 in its container environment.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers: jamiepine

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: disabling Numba JIT compilation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant