GitHub镜像网站
如果网络原因打不开GitHub的话,可以用这个网站进行克隆项目,将克隆代码修改一下
git clone https://github.com/comfyanonymous/ComfyUI.git
修改
git clone https://gitclone.com/github.com/comfyanonymous/ComfyUI.git
这个网站无法查看项目主页
huggingface镜像网站
界面和huggingface一样
克隆的时候也和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