|
import os
|
|
os.environ["HF_AUTH_TOKEN"] = ""
|
|
|
|
|
|
def download_from_huggingface(repo_id, filename, save_path):
|
|
from huggingface_hub import hf_hub_download
|
|
hf_hub_download(repo_id=repo_id, filename=filename, cache_dir=save_path, token=os.environ["HF_AUTH_TOKEN"])
|
|
print(f"File downloaded from Hugging Face: {os.path.join(save_path, filename)}")
|
|
|
|
|
|
hf_repo_and_files = [
|
|
("Drditone/Dynamic_prompt", "Frieren_character.txt"),
|
|
("Drditone/Dynamic_prompt", "Frieren_character_female.txt"),
|
|
("Drditone/Dynamic_prompt", "order_hair-bangs.txt"),
|
|
("Drditone/Dynamic_prompt", "order_natural-hair-color.txt"),
|
|
("Drditone/Dynamic_prompt", "order_natural-hair-style.txt"),
|
|
("Drditone/Dynamic_prompt", "style_LoRA.txt"),
|
|
("Drditone/Dynamic_prompt", "Style_LoRA_b.txt"),
|
|
("Drditone/Dynamic_prompt", "style_LoRA_mix.txt"),
|
|
("Drditone/Dynamic_prompt", "XL_LoRA.txt"),
|
|
("Drditone/Dynamic_prompt", "order_situation.txt")
|
|
]
|
|
|
|
|
|
save_directory = "/content/ReForge/extensions/sd-dynamic-prompts/wildcards"
|
|
|
|
|
|
for repo_id, file_name in hf_repo_and_files:
|
|
download_from_huggingface(repo_id, file_name, save_directory)
|
|
|