7/23/2024

download all files in specific folder from hugging face model

 refer to code:


.

# Download all files from the IP-Adapter/sdxl_models folder
from huggingface_hub import snapshot_download

# Download the sdxl_models folder and its contents
snapshot_download(
repo_id="h94/IP-Adapter",
repo_type="model",
local_dir="./IP-Adapter_sdxl_models",
allow_patterns=["sdxl_models/*"]
)

..


It download all files under the sdxl_models folder.


Thank you.

No comments:

Post a Comment