From bba650fc7d60c023c9a0377ad2571f969f4917f0 Mon Sep 17 00:00:00 2001 From: AI Lab <129358391+1038lab@users.noreply.github.com> Date: Sun, 14 Dec 2025 21:56:42 -0800 Subject: [PATCH] Update AILab_SAM2Segment.py --- AILab_SAM2Segment.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/AILab_SAM2Segment.py b/AILab_SAM2Segment.py index f9198e9..815e67f 100644 --- a/AILab_SAM2Segment.py +++ b/AILab_SAM2Segment.py @@ -25,14 +25,14 @@ except ImportError: print("Warning: GroundingDINO not available. Text prompts will use fallback method.") # Disable PyTorch JIT compilation -torch.jit._state._python_cu = None -torch._C._jit_set_profiling_mode(False) -torch._C._jit_set_profiling_executor(False) +# torch.jit._state._python_cu = None +# torch._C._jit_set_profiling_mode(False) +# torch._C._jit_set_profiling_executor(False) -original_jit_script = torch.jit.script -def patched_jit_script(obj): - return obj -torch.jit.script = patched_jit_script +# original_jit_script = torch.jit.script +# def patched_jit_script(obj): +# return obj +# torch.jit.script = patched_jit_script current_dir = os.path.dirname(__file__) sam2_path = os.path.join(current_dir, "sam2") @@ -406,4 +406,5 @@ NODE_CLASS_MAPPINGS = { NODE_DISPLAY_NAME_MAPPINGS = { "SAM2Segment": "SAM2 Segmentation (RMBG)", -} \ No newline at end of file + +}