Skip to content

docs: Fix SAM-2 build issues on Ubuntu 22.04 with Python 3.12#187

Open
bekhzod-olimov wants to merge 2 commits intoWan-Video:mainfrom
bekhzod-olimov:fix-sam2-compatibility
Open

docs: Fix SAM-2 build issues on Ubuntu 22.04 with Python 3.12#187
bekhzod-olimov wants to merge 2 commits intoWan-Video:mainfrom
bekhzod-olimov:fix-sam2-compatibility

Conversation

@bekhzod-olimov
Copy link

This pull request adds a detailed troubleshooting guide to the README.md to resolve compatibility issues when running the Wan-Animate preprocessing script.

Problem:

Users on certain modern environments (e.g., Ubuntu 22.04, Python 3.12) encounter fatal errors during the preprocess_data.py step for Wan-Animate. These errors can manifest as:

ImportError: undefined symbol

KeyError: 'frames_tracked_per_obj'

These issues are caused by an ABI incompatibility between the pre-compiled sam-2 package and the user's PyTorch/CUDA environment.

Solution:

This PR adds a collapsible "details" section to the Run Wan-Animate documentation. This new section provides clear, step-by-step instructions for:

Setting up the correct build environment (GCC-12, etc.).

Configuring necessary environment variables (CC, CXX, CUDA_HOME).

Re-installing the sam-2 package from a specific Git commit to ensure it compiles against the local environment.

Manually building the C++ extension in-place to finalize the fix.

This documentation change will help users self-service these common build issues and improve the out-of-the-box experience for the Wan-Animate module.

Closes #157[https://github.com//issues/157]

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.

sam-2 compatiblity error for replace mode

1 participant