Files
esh-pfi-infrastructure/stacks/scriberr/patches/0003-pyannote-env-pin-torchcodec.patch
T
vh 5896a7479c fix(scriberr): diarization works again: HF_TOKEN passthrough, pyannote env torchcodec pin (patch 0003); mirror retention; YaRN stays off
Scriberr: pyannote's diarization models are gated, and Scriberr had no Hugging
Face token, so every diarized job died at the diarize step (WhisperX after a full
CPU transcription). HF_TOKEN now passes through compose; the value is only in the
host .env (vault fv-ml1/hf-token). The separate pyannote env had torchcodec 0.16
(needs torch >=2.11/CUDA 13) beside torch 2.8, so pyannote 4 had no
AudioDecoder. Pinned to 0.7 by hand on the live env; patch 0003 makes it
durable at the next rebuild. WhisperX's adapter defaults to cpu/small/float32,
now documented. Both paths verified on GPU 3 with a real multi-speaker clip.

pbs-nh3: the backups-mirror prune job now keeps the primary's history
(last 3, daily 14, weekly 8, monthly 12, yearly 5). Dry-run: keep 738,
remove 3,194 across 32 groups; first run at the job's 00:00.
2026-10-06 13:20:21 -07:00

35 lines
1.3 KiB
Diff

Subject: [PATCH 0003] pyannote env: pin torch/torchaudio 2.8 and torchcodec 0.7
The embedded pyannote env leaves torchcodec unpinned (and torch >=2.5). On fv-ml1
(2026-10-06) uv resolved torch 2.8.0+cu128 with torchcodec 0.16.0, which needs
torch >=2.11 and CUDA 13 (libnvrtc.so.13). torchcodec's import fails, so
pyannote.audio 4 has no AudioDecoder, and every Parakeet+pyannote diarization
fails with "name 'AudioDecoder' is not defined". torchcodec's own compatibility
table pairs 0.7 with torch 2.8. Pin all three together, so a fresh env resolves
the set that was verified: community-1 diarization on GPU, 3 speakers on a 4-min
clip, 11 s.
---
--- a/internal/transcription/adapters/py/pyannote/pyproject.toml
+++ b/internal/transcription/adapters/py/pyannote/pyproject.toml
@@ -4,8 +4,8 @@
description = "Audio diarization using PyAnnote"
requires-python = ">=3.10"
dependencies = [
- "torch>=2.5.0",
- "torchaudio>=2.5.0",
+ "torch==2.8.*",
+ "torchaudio==2.8.*",
"huggingface-hub>=0.28.1",
"pyannote.audio==4.0.2"
]
@@ -18,7 +18,7 @@
[tool.uv]
override-dependencies = [
- "torchcodec ; sys_platform != 'linux' or platform_machine != 'aarch64'"
+ "torchcodec==0.7.* ; sys_platform != 'linux' or platform_machine != 'aarch64'"
]
[tool.uv.sources]