diff --git a/README.md b/README.md index be937400..cfc389a2 100644 --- a/README.md +++ b/README.md @@ -17,9 +17,7 @@ SAM 2 needs to be installed first before use. The code requires `python>=3.10`, as well as `torch>=2.3.1` and `torchvision>=0.18.1`. Please follow the instructions [here](https://pytorch.org/get-started/locally/) to install both PyTorch and TorchVision dependencies. You can install SAM 2 on a GPU machine using: ```bash -git clone https://github.com/facebookresearch/segment-anything-2.git - -cd segment-anything-2; pip install -e . +pip install git+https://github.com/facebookresearch/segment-anything-2.git ``` To use the SAM 2 predictor and run the example notebooks, `jupyter` and `matplotlib` are required and can be installed by: diff --git a/sam2/modeling/sam/transformer.py b/sam2/modeling/sam/transformer.py index 2a0b7960..122b9dd5 100644 --- a/sam2/modeling/sam/transformer.py +++ b/sam2/modeling/sam/transformer.py @@ -19,7 +19,7 @@ from sam2.utils.misc import get_sdpa_settings warnings.simplefilter(action="ignore", category=FutureWarning) -OLD_GPU, USE_FLASH_ATTN, MATH_KERNEL_ON = get_sdpa_settings() +OLD_GPU, USE_FLASH_ATTN, MATH_KERNEL_ON = True, True, True class TwoWayTransformer(nn.Module): diff --git a/setup.py b/setup.py index 85ae842f..e3eaed21 100644 --- a/setup.py +++ b/setup.py @@ -69,4 +69,8 @@ def get_extensions(): python_requires=">=3.10.0", ext_modules=get_extensions(), cmdclass={"build_ext": BuildExtension.with_options(no_python_abi_suffix=True)}, + include_package_data=True, + package_data={ + "sam2_configs": ["*.yaml"], + }, )