From 1dde1b2aaac3924c30086fea32b08adbdf7a3841 Mon Sep 17 00:00:00 2001 From: EJClaw Date: Sat, 3 Oct 2026 17:42:25 +0900 Subject: [PATCH] =?UTF-8?q?fix:=202~4=ED=8B=B0=EC=96=B4=EA=B0=80=20?= =?UTF-8?q?=EC=A1=B4=EC=9E=AC=ED=95=98=EC=A7=80=20=EC=95=8A=EB=8A=94=20?= =?UTF-8?q?=EC=9D=8C=EC=84=B1=EC=9D=B8=EC=8B=9D=20=EB=AA=A8=EB=8D=B8=20?= =?UTF-8?q?=EC=A0=80=EC=9E=A5=EC=86=8C=EB=A5=BC=20=EA=B0=80=EB=A6=AC?= =?UTF-8?q?=ED=82=A4=EB=8D=98=20=EA=B2=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Systran/faster-whisper-large-v3-turbo 는 Hugging Face 에 없는 저장소라 번역 시작 시 401 Repository Not Found 로 바로 실패했다. faster-whisper 가 'turbo' 로 공식 매핑하는 저장소 (mobiuslabsgmbh → 현재 dropbox-dash/faster-whisper-large-v3-turbo)로 바꾼다. 티어의 모든 ASR/MT 저장소가 로그인 없이 공개돼 있고 가중치가 있는지 확인하는 테스트를 추가했다 (오프라인이면 건너뜀). Co-Authored-By: Claude Opus 5.5 --- src/livesub/models/tiers.py | 6 +++--- tests/test_model_repos.py | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 tests/test_model_repos.py diff --git a/src/livesub/models/tiers.py b/src/livesub/models/tiers.py index 13bf279..3a8297d 100644 --- a/src/livesub/models/tiers.py +++ b/src/livesub/models/tiers.py @@ -120,7 +120,7 @@ SWIFT = _register( order=2, name="신속", tagline="빠르면서 인식률은 최상급", - asr=AsrSpec("Systran/faster-whisper-large-v3-turbo", "int8_float16", 1, 1600), + asr=AsrSpec("dropbox-dash/faster-whisper-large-v3-turbo", "int8_float16", 1, 1600), mt=MTSpec( "entai2965/nllb-200-distilled-600M-ctranslate2", MTBackend.CTRANSLATE2, @@ -140,7 +140,7 @@ BALANCE = _register( order=3, name="균형", tagline="기본값 · 속도와 품질의 중간", - asr=AsrSpec("Systran/faster-whisper-large-v3-turbo", "float16", 2, 2400), + asr=AsrSpec("dropbox-dash/faster-whisper-large-v3-turbo", "float16", 2, 2400), mt=MTSpec( "entai2965/nllb-200-distilled-1.3B-ctranslate2", MTBackend.CTRANSLATE2, @@ -160,7 +160,7 @@ PRECISION = _register( order=4, name="정밀", tagline="추천 · 현 시점 최고 번역 품질", - asr=AsrSpec("Systran/faster-whisper-large-v3-turbo", "float16", 2, 2400), + asr=AsrSpec("dropbox-dash/faster-whisper-large-v3-turbo", "float16", 2, 2400), mt=MTSpec( "ByteDance-Seed/Seed-X-PPO-7B-AWQ-Int4", MTBackend.TRANSFORMERS, diff --git a/tests/test_model_repos.py b/tests/test_model_repos.py new file mode 100644 index 0000000..0297753 --- /dev/null +++ b/tests/test_model_repos.py @@ -0,0 +1,37 @@ +"""티어에 적힌 Hugging Face 저장소가 실제로 로그인 없이 받아지는지 확인한다. + +저장소 이름이 틀리면 사용자 PC에서 "번역 시작"을 누를 때 401/404 로 처음 드러난다. +(v0.3.0-test4: 존재하지 않는 Systran/faster-whisper-large-v3-turbo 를 가리키고 있었다.) +네트워크가 없으면 건너뛴다. +""" + +import pytest + +from livesub.models.tiers import TIERS + +huggingface_hub = pytest.importorskip("huggingface_hub") + + +def _repos() -> list[str]: + return sorted({r for t in TIERS.values() for r in (t.asr.repo, t.mt.repo)}) + + +def _online() -> bool: + try: + huggingface_hub.HfApi().model_info("Systran/faster-whisper-small", token=False) + except Exception: + return False + return True + + +@pytest.mark.parametrize("repo", _repos()) +def test_repo_is_public_and_has_weights(repo): + if not _online(): + pytest.skip("Hugging Face 에 접속할 수 없음") + info = huggingface_hub.HfApi().model_info(repo, token=False) + assert not info.private + assert not info.gated + files = {s.rfilename for s in info.siblings} + assert files & {"model.bin", "model.safetensors"} or any( + f.endswith(".safetensors") for f in files + ), f"{repo}: 가중치 파일이 없음 ({sorted(files)})"