Views
No views yet
huggingface_hub (Version 0.1 as example):1import os
2from huggingface_hub import snapshot_download
3
4# download hf models
5BrushEdit_path = "models/"
6if not os.path.exists(BrushEdit_path):
7 BrushEdit_path = snapshot_download(
8 repo_id="TencentARC/BrushEdit",
9 local_dir=BrushEdit_path,
10 token=os.getenv("HF_TOKEN"),
11 )BrushEdit_path.