facebookresearch / facebookresearch/sam2

Prebuilt wheels provided via 3rd party repository

Open
#72 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
19.9k
Forks
2.5k
PR merge metrics
No merged PRs in 30d

Description

## Prebuilt wheels for PyTorch packages with custom ops

I've created a repository that can build PyTorch wheels with custom ops through the GitHub Actions pipeline and publish them using GitHub Releases. Check it out at https://github.com/MiroPsota/torch_packages_builder.

Since there are various ways how to use it, please refer to the repository README for more information.

If you prefer own build or can't trust a 3rd party repository, feel free to fork it and build any package/version/commit ID you desire yourself.

- **No Support for Pip Cache**: pip relies on http cache, and GitHub generates on-the-fly redirections for release links, so they are probably not playing nicely together. I recommend hosting it yourself.

### SAM_2 specific info:

Install using pip:
```
pip install --extra-index-url https://miropsota.github.io/torch_packages_builder SAM_2==+pt
```
Where `` is, as in PyTorch, one of `cpu`, `cu` (e.g. `cu121`, `cu118`, `cu102`), or `rocm` (not supported right now).

For example, the newest sam_2 commit (as of writing) `c2ec8e1`, PyTorch 2.6.0 with CUDA 12.6:
```
pip install --extra-index-url https://miropsota.github.io/torch_packages_builder SAM_2==1.0+c2ec8e1pt2.6.0cu12.6
```
Look at releases section if there are any other combinations, I will probably build occasionally with new pytorch releases and versions/commits.

These wheels are built with PyTorch versions `2.3.1` to `2.6.0` and their respective compute platforms and supported operating systems. Please note an exception for cu102 on Windows (due to no VS 2017 on the GitHub `windows-2019` runner) and the ROCm platform. The build is done using the available public GitHub runners, so they might not work on older OSes.

Although the wheels have been successfully built, I don't test them to work correctly.

If you've installed PyTorch with pip, there's no need to have CUDA installed on your system, as the PyTorch wheels for pip bundle CUDA.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.