Huanshere / Huanshere/VideoLingo
在国内使用时whisperx.load_model会卡6 7分钟
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 18.5k
- Forks
- 2k
- Avg merge
- 7h 41m
- Merged PRs (30d)
- 12
Description
你好!在测试时发现在调用whisperx.load_model会卡大概6 7分钟。
通过添加huggingface模块日志发现huggingface指向了huggingface.co,而我访问huggingface.co会很卡,我看在代码中通过os.environ['HF_ENDPOINT'] = check_hf_mirror()设置了HF_ENDPOINT环境变量为hf-mirror.com,但是却没有生效,后面发现是因为在import whisperx的时候,huggingface就会缓存当前的环境变量HF_ENDPOINT,而此时还未执行os.environ['HF_ENDPOINT'] = check_hf_mirror(),所以在whispxer以及huggingface模块中,HF_ENDPOINT还是默认的huggingface.co。
我将import whisperx放在os.environ['HF_ENDPOINT'] = check_hf_mirror()后面测试,发现该问题未出现。
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the import path for whisperx and the call to whisperx.load_model, then inspect where check_hf_mirror() assigns HF_ENDPOINT relative to the whisperx and Hugging Face imports. Reproduce the delayed load in a domestic network environment and verify that model loading uses the configured mirror before imports cache the endpoint.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- ai
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100