fix(openvino): корректный compute_type в CLI + индикатор прогресса
- Зачем: - CLI показывал int8, хотя реально использовался fp16 для large-v3. - при транскрипции OpenVINO не было индикации прогресса. - Что: - _resolve_repo возвращает (repo_id, actual_compute_type). - бэкенды сохраняют actual_compute_type после ensure_model_available. - CLI выводит фактический compute_type после load_model, а не дефолтный. - generate() запускается в потоке, статус обновляется каждую секунду с elapsed time. - Проверка: - uv run pytest -q — 124 passed. - uv run transcribe file.mp4 --device openvino --model large-v3 показывает fp16. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -136,11 +136,6 @@ def _run_single(
|
||||
output_path = build_output_path(validated_file, output)
|
||||
|
||||
console.print(f"Файл: [bold]{validated_file.name}[/bold]")
|
||||
console.print(
|
||||
f"Модель: [bold]{defaults['model']}[/bold] "
|
||||
f"Устройство: [bold]{resolved_device}[/bold] "
|
||||
f"Compute: [bold]{defaults['compute_type']}[/bold]"
|
||||
)
|
||||
|
||||
def on_segment(seg: Segment) -> None:
|
||||
console.print(f" [{seg.start:.2f}s] {seg.text.strip()}")
|
||||
@@ -150,6 +145,12 @@ def _run_single(
|
||||
on_status=lambda msg: console.print(msg), strict_device=strict,
|
||||
compute_type_explicit=compute_type_explicit,
|
||||
)
|
||||
actual_ct = getattr(backend, "actual_compute_type", defaults["compute_type"]) or defaults["compute_type"]
|
||||
console.print(
|
||||
f"Модель: [bold]{defaults['model']}[/bold] "
|
||||
f"Устройство: [bold]{actual_device}[/bold] "
|
||||
f"Compute: [bold]{actual_ct}[/bold]"
|
||||
)
|
||||
|
||||
with Status("Подготавливаю запуск...", console=console) as status:
|
||||
tfr = _transcribe_file(
|
||||
|
||||
Reference in New Issue
Block a user