Skip to content

Add Apple Silicon (MPS) backend support via torch.mps#222

Open
Nripesh Niketan (NripeshN) wants to merge 1 commit into
Lightricks:mainfrom
NripeshN:add-torchmps-support
Open

Add Apple Silicon (MPS) backend support via torch.mps#222
Nripesh Niketan (NripeshN) wants to merge 1 commit into
Lightricks:mainfrom
NripeshN:add-torchmps-support

Conversation

@NripeshN

@NripeshN Nripesh Niketan (NripeshN) commented May 29, 2026

Copy link
Copy Markdown

Summary

  • Introduces a unified device abstraction layer (packages/ltx-core/src/ltx_core/devices.py) that detects available backends (CUDA, MPS, CPU) and provides device-aware utilities for memory management, dtype selection, and op compatibility.
  • Updates all three packages (ltx-core, ltx-pipelines, ltx-trainer) to route through the new device layer, enabling Metal Performance Shaders (MPS) support on Apple Silicon Macs.
  • Handles MPS-specific limitations (e.g., missing ops, reduced precision support) with graceful fallbacks while preserving full CUDA functionality.

Introduces a unified device abstraction layer (`devices.py`) and updates
all packages (ltx-core, ltx-pipelines, ltx-trainer) to support Metal
Performance Shaders on Apple Silicon Macs alongside CUDA. Handles MPS-
specific limitations such as missing ops by providing fallback paths and
adapts memory management, attention, quantization, and block streaming
logic for the MPS backend.
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