Python 学习整理2

HUGGINGFACE_HUB_CACHE 设置错误导致的问题

PHPer 2025-08-24 19 0 0

真的吐了,Trae和腾讯元宝都找不出原因。报错只是只是显示401没有权限访问hf-mirror.com等等

或者是Cannot find an appropriate cached snapshot folder for the specified revision on the local disk and outgoing traffic has been disabled. To enable repo look-ups and downloads online, pass 'local_files_only=False' as input.

代码加载模型一直报错

import whisperx
device = "cuda"  # 或者 "cpu"
model_whisper = whisperx.load_model("base", device=device, compute_type="float32")
RuntimeError: 无法加载 WhisperX 模型,请检查安装和环境。Cannot find an appropriate cached snapshot folder for the specified revision on the local disk and outgoing traffic has been disabled. To enable repo look-ups and downloads online, pass 'local_files_only=False' as input.

返回的错误一直就是下面这类的。

不能直连HF官网后,本地加载模型一直失败,直接花了我6个小时以上,最后无意中发现项目的根目录多出来两个文件夹,一个是$HUGGINGFACE_HOME,另一个是.cache。删除后,正常了。 ...

立即注册
更新于:2025-08-24 03:35:26
    您需要登录后才可以评论。 立即注册
    相关内容

    curl超时的设置

    console.log() %c 加入样式中 color 颜色设置无效的问题。

    推荐内容

    怎样使用V2Ray代理和SSTap玩如魔兽世界/绝地求生/LOL台服/战地3/黑色沙漠/彩...

    sstap游戏代理教程 从此玩如魔兽世界/绝地求生/LOL台服/战地3/黑色沙漠/彩虹六...

    BT磁力搜索网站汇总和找不到的资源

    什么是磁力链接,您如何使用?

    Z-Library:全球最大的数字图书馆/含打不开的解决方案/镜像

    使用V2Ray的mKCP协议加速游戏

    v2rayN已停止工作

    【车险课堂】什么是无赔款优待系数ncd,你“造”吗?