AI和Python 学习整理

在hf-mirror.com模型镜像站用代码下载模型遇到报错 speaker-diarization模型不让下载 20250820

PHPer 2025-08-20 1 0 0

Cannot access gated repo for url https://hf-mirror.com/pyannote/speaker-diarization-3.1/resolve/84fd25912480287da0247647c3d2b4853cb3ee5d/.gitattributes.

Access to model pyannote/speaker-diarization-3.1 is restricted. You must have access to it and be authenticated to access it. Please log in.


from huggingface_hub import snapshot_download
import os
# 设置环境变量
os.environ['HF_ENDPOINT'] = 'https://hf-mirror.com'
os.environ["HF_DATASETS_CACHE"] = "D:/python/Tse/models"
os.environ["HF_MODELS_CACHE"] = "D:/python/Tse/models"
# 指定模型名称
model_name = "pyannote/speaker-diarization-3.1"
# 指定您想要保存模型的本地目录
# local_dir = "D:/python/Tse/models/pyannote/speaker-diarization-3.1"
local_dir = "D:/python/Tse/models"
# 下载整个模型到指定的本地目录
snapshot_download(repo_id=model_name, cache_dir=local_dir)

报错如下

Cannot access gated repo for url https://hf-mirror.com/pyannote/speaker-diarization-3.1/resolve/84fd25912480287da0247647c3d2b4853cb3ee5d/.gitattributes.
Access to model pyannote/speaker-diarization-3.1 is restricted. You must have access to it and be authenticated to access it. Please log in.

去hf-mirror查,说是要去Huggingface,问题Huggingface科学上网都访问不了,根本申请不了...

立即注册

更新于:2025-08-20 15:10:55
    您需要登录后才可以评论。 立即注册
    相关内容

    富文本粘贴处理还是没把www.cnblogs.com上的复制代码的样式去掉 20200405

    python代码整理(2022年4月-2024年3月)

    Python和PHP获取百度url跳转的真实地址代码(2022年4月实测有效)

    Pip/python-如何查看已安装的包有哪些版本?如何查看某个包存在哪些版本?pip...

    用undetected_chromedriver代替selenium解决浏览器打不开网页

    sublime text下 Python 问题:TabError: inconsistent use of tabs and s...

    magento安装遇到的问题,注册magento.com

    6 Steps to Install Magento 2 on CentOS [Latest] - Sample Data

    magento安装时报错The store that was requested wasn't found. Verify the...

    magento命令行安装成功后,在浏览器直接用ip加目录访问不到网站,要配置虚拟主机

    Magento Composer安装时,必要时直接忽略版本 composer install --ignore-p...

    Magento 介绍

    Xampp安装后apache启动失败报错 www.example.com:443:0 server certificate...

    python 学习中遇到的问题整理

    没有使用asynccontextmanager ,但是报cannot import name 'asynccontextman...

    python3.10.0+pyinstaller4.7打包,IndexError: tuple index out of range...

    error: Microsoft Visual C++ 14.0 or greater is required.

    安装conda搭建python环境(保姆级教程)

    学习飞浆过程中遇到“缺少paddle.fluid”

    [NLP实践01]simpletransformers安装和文本分类简单实现

    primeqa 安装requirements时报错

    sublime text下 Python 问题:TabError: inconsistent use of tabs and s...

    uiautomation报错 No module named 'comtypes.stream' Can not load UIA...

    解决无法加载UIAutomationCore.dll的报错

    汉字目标点选识别-ddddocr(返回识别的内容和位置)

    python 常用命令

    opencv报错及解决:AttributeError: module ‘cv2‘ has no attribute ‘...

    AttributeError: module 'cv2.cv2' has no attribute 'cv'

    sublime text常用快捷键及多行列模式批量操作教程

    python配置opencv环境后,读取图片,报错:can‘t open/read file: check f...

    推荐内容

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

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

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

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

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

    使用V2Ray的mKCP协议加速游戏

    v2rayN已停止工作

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