Skip to content

fix turn-detector loading issue due to transformers 4.57.2#4084

Merged
theomonnom merged 1 commit intomainfrom
longc/pin-transformers
Nov 25, 2025
Merged

fix turn-detector loading issue due to transformers 4.57.2#4084
theomonnom merged 1 commit intomainfrom
longc/pin-transformers

Conversation

@longcw
Copy link
Copy Markdown
Contributor

@longcw longcw commented Nov 25, 2025

temporally fix turn detector loading issue introduced by transformers 4.57.2

Could not find model livekit/turn-detector with revision v0.4.1-intl. Make sure you have downloaded the model before running the agent. Use `python3 your_agent.py download-files` to download the models.
error initializing inference runner
Traceback (most recent call last):
  File "/Users/darryncampbell/temp/agent-starter-python/.venv/lib/python3.13/site-packages/livekit/agents/ipc/inference_proc_lazy_main.py", line 69, in initialize
    runner.initialize()
    ~~~~~~~~~~~~~~~~~^^
  File "/Users/darryncampbell/temp/agent-starter-python/.venv/lib/python3.13/site-packages/livekit/plugins/turn_detector/base.py", line 146, in initialize
    raise RuntimeError(
    ...<2 lines>...
    ) from None
RuntimeError: livekit-plugins-turn-detector initialization failed. Could not find model livekit/turn-detector with revision v0.4.1-intl.

related to huggingface/transformers#42369

the issue was caused by this change https://github.com/huggingface/transformers/pull/42299/files#diff-85b29486a884f445b1014a26fecfb189141f2e6b09f4ae701ee758a754fddcc1R2102, we set local_files_only=True and the pretrained_model_name_or_path is the repo name livekit/turn-detector, it goes to remote_files = os.listdir(pretrained_model_name_or_path) which raises the file not found error

@longcw longcw requested a review from a team November 25, 2025 13:16
Copy link
Copy Markdown
Member

@chenghao-mou chenghao-mou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@theomonnom theomonnom merged commit 071dcbb into main Nov 25, 2025
16 of 18 checks passed
@theomonnom theomonnom deleted the longc/pin-transformers branch November 25, 2025 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants