Disable JIT compilation for Numba - #1020
Open
boessu wants to merge 1 commit into
Open
Conversation
Fix librosa/numba caching crash on model load
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe Docker Compose configuration adds ChangesVoicebox runtime configuration
Estimated code review effort: 1 (Trivial) | ~2 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix librosa/numba caching crash on model load
Problem
Loading TTS models that depend on
librosa(e.g. Qwen3-TTS) fails with: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_*andlibrosa_*cachedirectories are created and writable before the crash). The failure is specific
to
__o_fold, a double-underscore-prefixed function — numba's cache locatorshave 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=1to disable numba's JIT compilation entirely for thecontainer process:
Trade-off
The handful of numba-accelerated helper functions in
librosa(note-nameconversion, 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
Model download and load now complete without the RuntimeError.
Summary by CodeRabbit