Post

Huggingface Cli

Huggingface Cli

Install

1
2
pip install -U huggingface_hub #  Python>=3.8

Login

1
huggingface-cli login ## get the token from website

Download Models

1
2
3
4
huggingface-cli download --resume-download {model name from huggingface} --local-dir {current_dictory} # Download in the current directory

# example 
huggingface-cli download --resume-download black-forest-labs/FLUX.1-dev --local-dir FLUX.1-dev

Download Dataset

1
huggingface-cli download --resume-download --repo-type dataset XXXX/XXXX-XX-XXXXX-XX-XX-XXX
This post is licensed under CC BY 4.0 by the author.