Avatarify for Mac Intel and Apple Silicon#805
Open
Nene020911 wants to merge 7 commits intoalievk:masterfrom
Open
Avatarify for Mac Intel and Apple Silicon#805Nene020911 wants to merge 7 commits intoalievk:masterfrom
Nene020911 wants to merge 7 commits intoalievk:masterfrom
Conversation
…support Previously Mac was restricted to client-only mode which required a remote GPU server. This change enables full local mode on macOS by: - Adding MPS (Metal Performance Shaders) device detection for Apple Silicon GPU acceleration in predictor_local.py - Removing the hard exit on macOS for non-client mode in cam_fomm.py - Updating install_mac.sh to support full local installation with Python 3.9, PyTorch, FOMM, and model weights (with --client-only flag for lightweight mode) - Updating all dependency versions to be compatible with modern macOS and Python - Removing Linux-only pyfakewebcam from shared requirements.txt - Handling face_alignment LandmarksType API change (_2D vs TWO_D) - Adding requirements_mac.txt for Mac-specific full dependencies https://claude.ai/code/session_01EiiFT7HvY245A37u62BC6z
Old pyzmq versions use the `pipes` module which was removed in Python 3.13, causing a ModuleNotFoundError during installation on modern macOS. https://claude.ai/code/session_01EiiFT7HvY245A37u62BC6z
PyTorch builds against NumPy 1.x are incompatible with NumPy 2.x, causing "RuntimeError: Numpy is not available" at runtime. https://claude.ai/code/session_01EiiFT7HvY245A37u62BC6z
opencv-python 4.11+ requires numpy>=2 on Python 3.9+, which conflicts with PyTorch's numpy<2 requirement. Capping to <4.11.0 resolves the dependency conflict. https://claude.ai/code/session_01EiiFT7HvY245A37u62BC6z
Modern PyTorch pip wheels are built against numpy 2.x. Pinning
numpy<2.0.0 causes a binary incompatibility ("Numpy is not available"
RuntimeError). Removing all version caps lets pip resolve a consistent
set of numpy 2.x + opencv-python 4.11+ + PyTorch packages.
https://claude.ai/code/session_01EiiFT7HvY245A37u62BC6z
Python 3.9 only gets PyTorch <=2.2.x which was built against numpy 1.x. When pip resolves numpy 2.x, torch.from_numpy() fails with "RuntimeError: Numpy is not available" due to ABI mismatch. Python 3.11 gets PyTorch 2.5+ which is built against numpy 2.x, eliminating the incompatibility. https://claude.ai/code/session_01EiiFT7HvY245A37u62BC6z
llvmlite requires LLVM development headers to build from source via pip. Installing it through conda provides pre-built binaries that include the required LLVM libraries. https://claude.ai/code/session_01EiiFT7HvY245A37u62BC6z
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.
Update.