Spaces:
Paused
Paused
Zhen Ye Claude Opus 4.6 commited on
Commit ·
10eb3c6
1
Parent(s): 4c36e1e
fix: drop fullgraph=True from torch.compile for broader compatibility
Browse filesfullgraph=True requires no graph breaks, which fails without
SAM2VideoPredictorVOS's .clone() patches. Removing it allows
torch.compile to handle graph breaks gracefully via partial
compilation.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
models/segmenters/grounded_sam2.py
CHANGED
|
@@ -395,11 +395,11 @@ class GroundedSAM2Segmenter(Segmenter):
|
|
| 395 |
"""
|
| 396 |
vp = self._video_predictor
|
| 397 |
components = [
|
| 398 |
-
("image_encoder", dict(mode="max-autotune",
|
| 399 |
-
("memory_encoder", dict(mode="max-autotune",
|
| 400 |
-
("memory_attention", dict(mode="max-autotune",
|
| 401 |
-
("sam_prompt_encoder", dict(mode="max-autotune",
|
| 402 |
-
("sam_mask_decoder", dict(mode="max-autotune",
|
| 403 |
]
|
| 404 |
self._original_forwards: Dict[str, Any] = {}
|
| 405 |
compiled = []
|
|
|
|
| 395 |
"""
|
| 396 |
vp = self._video_predictor
|
| 397 |
components = [
|
| 398 |
+
("image_encoder", dict(mode="max-autotune", dynamic=False)),
|
| 399 |
+
("memory_encoder", dict(mode="max-autotune", dynamic=False)),
|
| 400 |
+
("memory_attention", dict(mode="max-autotune", dynamic=True)),
|
| 401 |
+
("sam_prompt_encoder", dict(mode="max-autotune", dynamic=False)),
|
| 402 |
+
("sam_mask_decoder", dict(mode="max-autotune", dynamic=False)),
|
| 403 |
]
|
| 404 |
self._original_forwards: Dict[str, Any] = {}
|
| 405 |
compiled = []
|