fix sam2 hopefully

This commit is contained in:
2025-07-26 08:03:37 -07:00
parent 1bec8113de
commit eeed9ee578
6 changed files with 187 additions and 17 deletions

View File

@@ -27,7 +27,7 @@ class MattingConfig:
use_disparity_mapping: bool = True
memory_offload: bool = True
fp16: bool = True
sam2_model_cfg: str = "sam2_hiera_l.yaml"
sam2_model_cfg: str = "sam2_hiera_l"
sam2_checkpoint: str = "sam2_hiera_large.pt"

View File

@@ -19,7 +19,7 @@ class SAM2VideoMatting:
"""SAM2-based video matting with memory optimization"""
def __init__(self,
model_cfg: str = "sam2_hiera_l.yaml",
model_cfg: str = "sam2_hiera_l",
checkpoint_path: str = "sam2_hiera_large.pt",
device: str = "cuda",
memory_offload: bool = True,