import os def download_file(url, save_path): command = f'aria2c --console-log-level=error -c -x 16 -s 16 -k 1M -d {os.path.dirname(save_path)} -o {os.path.basename(save_path)} {url}' os.system(command) print(f"File downloaded: {save_path}") # URLと対応するファイル名のリスト urls_and_names = [ ("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/Frieren_character.txt", "Frieren_character.txt"), ("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/Frieren_character_female.txt", "Frieren_character_female.txt"), ("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/order_hair-bangs.txt", "order_hair-bangs.txt"), ("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/order_natural-hair-color.txt", "order_natural-hair-color.txt"), ("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/order_natural-hair-style.txt", "order_natural-hair-style.txt"), ("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/style_LoRA.txt", "style_LoRA.txt"), ("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/Style_LoRA_b.txt", "Style_LoRA_b.txt"), ("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/style_LoRA_mix.txt", "style_LoRA_mix.txt"), ("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/XL_LoRA.txt", "XL_LoRA.txt"), ("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/x.txt", "x.txt"), ("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/x_2.txt", "x_2.txt"), ("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/x_3.txt", "x_3.txt"), ("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/x_4.txt", "x_4.txt"), ("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/x_face.txt", "x_face.txt"), ("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/x_first.txt", "x_first.txt"), ("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/x_second.txt", "x_second.txt"), ("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/x_position.txt", "x_position.txt"), ("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/clothing.txt", "clothing.txt"), ("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/covering.txt", "covering.txt"), ("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/basic_motion.txt", "basic_motion.txt"), ("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/extra_motion.txt", "extra_motion.txt"), ("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/grabbing.txt", "grabbing.txt"), ("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/hand_gesture.txt", "hand_gesture.txt"), ("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/leg_gesture.txt", "leg_gesture.txt"), ("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/order_character.txt", "order_character.txt"), ("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/order_situation.txt", "order_situation.txt") ] # 保存先ディレクトリ save_directory = "/content/ReForge/extensions/sd-dynamic-prompts/wildcards" # 各URLからファイルをダウンロード for url, file_name in urls_and_names: save_path = os.path.join(save_directory, file_name) download_file(url, save_path)