GitHub和huggingface镜像网站

GitHub镜像网站

gitclone

如果网络原因打不开GitHub的话,可以用这个网站进行克隆项目,将克隆代码修改一下

git clone https://github.com/comfyanonymous/ComfyUI.git

修改

git clone https://gitclone.com/github.com/comfyanonymous/ComfyUI.git

这个网站无法查看项目主页

huggingface镜像网站

界面和huggingface一样

hf-mirror

克隆的时候也和huggingface一样

主页有其他克隆模型的教程

测试发现用git克隆的时候总是断掉,就写了个代码用huggingface_hub下载

def huggingface_download():
    cache_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "models")
    model_name = "meta-llama/Meta-Llama-3-8B"
    model_cache_path = f'{cache_path}/{model_name}'
    os.makedirs(model_cache_path, exist_ok=True)
    os.environ["HF_ENDPOINT"] = "https://hf-mirror.com"
    cmd = f'huggingface-cli download --resume-download {model_name} --local-dir {model_cache_path}'
    p_inference = Popen(cmd, shell=True)
    p_inference.wait()

使用 huggingface_hub可以断点续传,不用担心下一半断了重新下

代码是python的,使用前先安装依赖

pip install huggingface_hub

魔搭

下载模型也可以去阿里的魔搭,只是需要注册登录,模型也不全

魔搭

点这个按钮复制后用git进行克隆

git clone https://www.modelscope.cn/qwen/Qwen1.5-110B-Chat.git

  • 4
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值