Skip to content

Apple Silicon compatibility#10

Open
LeJeko wants to merge 8 commits intoshowlab:mainfrom
LeJeko:apple_silicon
Open

Apple Silicon compatibility#10
LeJeko wants to merge 8 commits intoshowlab:mainfrom
LeJeko:apple_silicon

Conversation

@LeJeko
Copy link

@LeJeko LeJeko commented May 25, 2025

This pull request introduces support for running the LiveCC application on Apple Silicon (tested on M1 Max and M2 Max, 32GB RAM) and includes related updates to the installation guide, demo files, and device handling logic. The most important changes are grouped into installation instructions, demo updates, and device compatibility improvements.

Performance is not fully real-time, but the solution works and demonstrates that LiveCC can run on these architectures.

Installation Instructions for Apple Silicon:

  • Added a detailed installation guide for Apple Silicon in the README.md, including steps for setting up dependencies like xcode, miniconda, brew, and specific versions of tools such as ffmpeg. It also includes instructions for compiling decord for the arm64 architecture.

Demo Updates:

  • Added a new demo video file (demo/sources/LiveCC_on_Apple_Silicon.mp4) to the list of example inputs in demo/app.py.

Device Compatibility Improvements:

  • Updated demo/infer.py to dynamically select the device (mps, cuda, or cpu) based on availability. This ensures compatibility with Apple Silicon by using the mps backend when available.

LeJeko and others added 7 commits May 19, 2025 08:55
Introduces support for Metal Performance Shaders (MPS), allowing the demo to run on Apple Silicon.
The inference script now dynamically selects the device (MPS, CUDA, or CPU) and conditionally applies FlashAttention.
Dependencies are updated to improve cross-platform compatibility, removing `liger_kernel`, `deepspeed`, and using the general `onnxruntime`.
A new example video showcasing Apple Silicon execution is added.
Gradio certificate files are now ignored.
@LeJeko LeJeko marked this pull request as ready for review May 25, 2025 14:45
@chenjoya
Copy link
Collaborator

Amazing work! so great 👍🐮🍺 will check on a apple silicon mac then merge that!

@LeJeko LeJeko changed the title Apple silicon compatibility Apple Silicon compatibility May 25, 2025
@LeJeko
Copy link
Author

LeJeko commented May 30, 2025

Two more remarks:

  1. git-lfs can also be installed via pip3 install git-lfs (brew is only required for ffmpeg@4)
  2. DeepSpeed is not necessary after all, and you can skip its installation.

…ge git-lfs installation command to pip and remove conda-forge dependencies
@chenjoya
Copy link
Collaborator

chenjoya commented Jun 28, 2025

Hi LeJeko, your PR is great but since github said:
image

This is because I have made some changes in main branch after your PR. Now I have fixed the key part to support mps following your changes

if torch.backends.mps.is_available():

But I did not fix the readme. Would you mind to update your PR with a new markdown file about the environment installation? Thank you so much! 🥺

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.

2 participants