fix: remove legacy checkpoint fallbacks, strictly enforce NoteSoop_stt_v2_best.pt
Browse files- transcribe.py +3 -9
transcribe.py
CHANGED
|
@@ -286,15 +286,9 @@ class EmbeddingGemmaSTTV2:
|
|
| 286 |
if not ckpt_p.is_absolute():
|
| 287 |
ckpt_p = self.root / ckpt_p
|
| 288 |
else:
|
| 289 |
-
|
| 290 |
-
|
| 291 |
-
|
| 292 |
-
self.root / "checkpoints/best_reader_inference.pt",
|
| 293 |
-
self.root / "checkpoints/best_reader.pt",
|
| 294 |
-
]
|
| 295 |
-
ckpt_p = next((p for p in ckpt_candidates if p.exists()), None)
|
| 296 |
-
if ckpt_p is None:
|
| 297 |
-
raise FileNotFoundError("No checkpoint found in checkpoints/ directory.")
|
| 298 |
|
| 299 |
print(f"📦 [Notesoop V2 Engine] Initializing on {self.device.type.upper()} ({self.dev_str})...")
|
| 300 |
ckpt = torch.load(ckpt_p, map_location="cpu", weights_only=False)
|
|
|
|
| 286 |
if not ckpt_p.is_absolute():
|
| 287 |
ckpt_p = self.root / ckpt_p
|
| 288 |
else:
|
| 289 |
+
ckpt_p = self.root / "checkpoints/NoteSoop_stt_v2_best.pt"
|
| 290 |
+
if not ckpt_p.exists():
|
| 291 |
+
raise FileNotFoundError(f"Checkpoint not found: {ckpt_p}")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 292 |
|
| 293 |
print(f"📦 [Notesoop V2 Engine] Initializing on {self.device.type.upper()} ({self.dev_str})...")
|
| 294 |
ckpt = torch.load(ckpt_p, map_location="cpu", weights_only=False)
|