feat(mlx): add Apple Silicon video backend - #11444
Open
localai-org-maint-bot wants to merge 2 commits into
Open
Conversation
Add a Darwin-only MLX-Video backend for LTX-2 and converted Wan checkpoints, expose it through the existing video API, and wire packaging, discovery, tests, docs, and an example. Assisted-by: Codex:gpt-5
The pinned mlx-video package requires Python 3.11 or newer, while an empty PYTHON_VERSION selected the backend helper default of 3.10. Pin the available 3.11.13 portable runtime for the Darwin package build. Assisted-by: Codex:gpt-5
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.
Description
Adds an Apple-Silicon-only
mlx-videobackend for LTX-2 and converted Wan2.1/Wan2.2 checkpoints through LocalAI's existingPOST /videoAPI.Closes #8085
Notes for reviewers
The pinned upstream currently exposes generation as CLI-oriented functions that load their pipeline within a generation invocation. This backend keeps that lifecycle rather than relying on upstream internals that do not provide a stable reusable pipeline API.
Wan checkpoints must already be converted to MLX and available as a local directory. The upstream LTX-2 path can resolve supported Hugging Face repositories.
Test plan
python3 backend/python/mlx-video/test.py(4 tests pass)python3 -m py_compile backend/python/mlx-video/backend.py backend/python/mlx-video/mlx_video_utils.py backend/python/mlx-video/test.pybash -n backend/python/mlx-video/install.sh backend/python/mlx-video/run.sh backend/python/mlx-video/test.shbackend/index.yaml,.github/backend-matrix.yml, and the example configmake test-ci-scripts(41 tests pass)git diff --checkgo test ./core/config/...reached 499/500 specs; the only failure is the existing network-dependent config validation test because this environment returns HTTP 403 forraw.githubusercontent.comA native backend package/model generation smoke test requires an Apple Silicon runner and is left to Darwin CI.