赞
踩
首先确保已经安装了huggingface_hub依赖包
pip install -U huggingface_hub
设置环境变量
export HF_ENDPOINT=https://hf-mirror.com
Windows
set HF_ENDPOINT=https://hf-mirror.com
下载模型
huggingface-cli download --resume-download InstantX/InstantID --local-dir ./checkpoints
下载数据集
huggingface-cli download --repo-type dataset --resume-download InstantX/InstantID --local-dir ./checkpoints
- from huggingface_hub import hf_hub_download
-
- hf_hub_download(repo_id="InstantX/InstantID", filename="ControlNetModel/config.json", local_dir="./checkpoints")
- hf_hub_download(repo_id="InstantX/InstantID", filename="ControlNetModel/diffusion_pytorch_model.safetensors", local_dir="./checkpoints")
- hf_hub_download(repo_id="InstantX/InstantID", filename="ip-adapter.bin", local_dir="./checkpoints")
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。