From 7852303b409b746d9ac599fb4166dbc375bc9b33 Mon Sep 17 00:00:00 2001 From: Scott Register Date: Sat, 26 Jul 2025 08:47:50 -0700 Subject: [PATCH] maybe fix --- vr180_matting/sam2_wrapper.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vr180_matting/sam2_wrapper.py b/vr180_matting/sam2_wrapper.py index 320da35..f393c82 100644 --- a/vr180_matting/sam2_wrapper.py +++ b/vr180_matting/sam2_wrapper.py @@ -67,10 +67,12 @@ class SAM2VideoMatting: # Enable memory optimizations if self.memory_offload: - self.predictor.fill_hole_area = 8 + # SAM2 has different memory optimization options + pass # Memory offloading is handled by SAM2 internally if self.fp16 and self.device == "cuda": - self.predictor.model.half() + # SAM2 handles FP16 internally, no need to manually convert + pass except Exception as e: raise RuntimeError(f"Failed to load SAM2 model: {e}")