feat: 全系统统一 Whisper V2 权重并移除 demo 工作流
确认所有运行时引用均使用 V2(V3 已停用),并修复一处真实不一致: - 工作流数据文件:learn-translate 用 faster-whisper-large-v2、 zh-direct 用 whisper-large-v2-translate-zh-v0.2-st-ct2(原本即 V2); - 本地库的 demo 最新版本仍指向 large-v3:workflows/demo.json 早已改为 V2, 但 seed 对已存在工作流刻意跳过,导致旧库停留在历史上用 V3 保存的定义, 即本机跑 demo 实际加载 V3 权重。按用户决定移除 demo 工作流及其关联的 6 个 run、1 个批量任务与 431 条明细(媒体库中已放置的 6 个字幕成品保留); - nodes/whisper.py 候选与远端兜底本就是 large-v2; - V3 权重目录保留在盘上仅作对照实验,文档标注为废弃; scripts/compare_whisper_v2_vs_v3.py 保留用于对照。 顺带修复与清理: - src/wov_app/scheduler.py:_file_size 补捕 ValueError(见上一条提交说明 的真实缺陷,此处为同一批改动); - .gitignore:data/ 改为 /data/,避免连带忽略 tests/**/data/; - scripts/*:评测集路径改到 scripts/data/translate_eval/; - 代码注释与文档同步移除 demo 引用(历史调研文档保留说明性引用)。 验证:全量 477 passed;新库 seed 只创建 3 个 V2 工作流。
This commit is contained in:
@@ -37,6 +37,13 @@ def parse_srt(text: str) -> list[Cue]:
|
||||
index += 2
|
||||
body = []
|
||||
while index < len(lines) and lines[index].strip():
|
||||
# 正文行不允许是时间戳行:出现即说明条目之间缺少空行分隔。
|
||||
# 若不报错,下一条的序号与时间轴会被当成上一条正文吞掉,
|
||||
# 静默产出时间与文本错位的字幕(同“静默错位”类缺陷)。
|
||||
if _TIMESTAMP.fullmatch(lines[index].strip()):
|
||||
raise ValueError(
|
||||
f"missing blank line before cue at line {index + 1}"
|
||||
)
|
||||
body.append(lines[index])
|
||||
index += 1
|
||||
entries.append(Cue(match[1], match[2], "\n".join(body)))
|
||||
|
||||
Reference in New Issue
Block a user