Update dynamic-prompts_kaggle.py
Browse files- dynamic-prompts_kaggle.py +45 -44
dynamic-prompts_kaggle.py
CHANGED
@@ -1,44 +1,45 @@
|
|
1 |
-
import os
|
2 |
-
|
3 |
-
def download_file(url, save_path):
|
4 |
-
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}'
|
5 |
-
os.system(command)
|
6 |
-
print(f"File downloaded: {save_path}")
|
7 |
-
|
8 |
-
# URLと対応するファイル名のリスト
|
9 |
-
urls_and_names = [
|
10 |
-
("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/Frieren_character.txt", "Frieren_character.txt"),
|
11 |
-
("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/Frieren_character_female.txt", "Frieren_character_female.txt"),
|
12 |
-
("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/order_hair-bangs.txt", "order_hair-bangs.txt"),
|
13 |
-
("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/order_natural-hair-color.txt", "order_natural-hair-color.txt"),
|
14 |
-
("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/order_natural-hair-style.txt", "order_natural-hair-style.txt"),
|
15 |
-
("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/style_LoRA.txt", "style_LoRA.txt"),
|
16 |
-
("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/Style_LoRA_b.txt", "Style_LoRA_b.txt"),
|
17 |
-
("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/style_LoRA_mix.txt", "style_LoRA_mix.txt"),
|
18 |
-
("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/XL_LoRA.txt", "XL_LoRA.txt"),
|
19 |
-
("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/x.txt", "x.txt"),
|
20 |
-
("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/x_2.txt", "x_2.txt"),
|
21 |
-
("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/x_3.txt", "x_3.txt"),
|
22 |
-
("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/x_4.txt", "x_4.txt"),
|
23 |
-
("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/x_face.txt", "x_face.txt"),
|
24 |
-
("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/x_first.txt", "x_first.txt"),
|
25 |
-
("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/x_second.txt", "x_second.txt"),
|
26 |
-
("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/x_position.txt", "x_position.txt"),
|
27 |
-
("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/clothing.txt", "clothing.txt"),
|
28 |
-
("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/covering.txt", "covering.txt"),
|
29 |
-
("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/basic_motion.txt", "basic_motion.txt"),
|
30 |
-
("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/extra_motion.txt", "extra_motion.txt"),
|
31 |
-
("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/grabbing.txt", "grabbing.txt"),
|
32 |
-
("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/hand_gesture.txt", "hand_gesture.txt"),
|
33 |
-
("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/leg_gesture.txt", "leg_gesture.txt"),
|
34 |
-
("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/
|
35 |
-
("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
|
|
|
1 |
+
import os
|
2 |
+
|
3 |
+
def download_file(url, save_path):
|
4 |
+
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}'
|
5 |
+
os.system(command)
|
6 |
+
print(f"File downloaded: {save_path}")
|
7 |
+
|
8 |
+
# URLと対応するファイル名のリスト
|
9 |
+
urls_and_names = [
|
10 |
+
("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/Frieren_character.txt", "Frieren_character.txt"),
|
11 |
+
("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/Frieren_character_female.txt", "Frieren_character_female.txt"),
|
12 |
+
("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/order_hair-bangs.txt", "order_hair-bangs.txt"),
|
13 |
+
("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/order_natural-hair-color.txt", "order_natural-hair-color.txt"),
|
14 |
+
("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/order_natural-hair-style.txt", "order_natural-hair-style.txt"),
|
15 |
+
("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/style_LoRA.txt", "style_LoRA.txt"),
|
16 |
+
("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/Style_LoRA_b.txt", "Style_LoRA_b.txt"),
|
17 |
+
("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/style_LoRA_mix.txt", "style_LoRA_mix.txt"),
|
18 |
+
("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/XL_LoRA.txt", "XL_LoRA.txt"),
|
19 |
+
("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/x.txt", "x.txt"),
|
20 |
+
("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/x_2.txt", "x_2.txt"),
|
21 |
+
("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/x_3.txt", "x_3.txt"),
|
22 |
+
("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/x_4.txt", "x_4.txt"),
|
23 |
+
("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/x_face.txt", "x_face.txt"),
|
24 |
+
("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/x_first.txt", "x_first.txt"),
|
25 |
+
("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/x_second.txt", "x_second.txt"),
|
26 |
+
("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/x_position.txt", "x_position.txt"),
|
27 |
+
("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/clothing.txt", "clothing.txt"),
|
28 |
+
("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/covering.txt", "covering.txt"),
|
29 |
+
("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/basic_motion.txt", "basic_motion.txt"),
|
30 |
+
("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/extra_motion.txt", "extra_motion.txt"),
|
31 |
+
("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/grabbing.txt", "grabbing.txt"),
|
32 |
+
("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/hand_gesture.txt", "hand_gesture.txt"),
|
33 |
+
("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/leg_gesture.txt", "leg_gesture.txt"),
|
34 |
+
("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/memories.txt", "memories.txt"),
|
35 |
+
("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/order_character.txt", "order_character.txt"),
|
36 |
+
("https://huggingface.co/datasets/Drditone/Dynamic_prompt/resolve/main/order_situation.txt", "order_situation.txt")
|
37 |
+
]
|
38 |
+
|
39 |
+
# 保存先ディレクトリ
|
40 |
+
save_directory = "/kaggle/working/ReForge/extensions/sd-dynamic-prompts/wildcards"
|
41 |
+
|
42 |
+
# 各URLからファイルをダウンロード
|
43 |
+
for url, file_name in urls_and_names:
|
44 |
+
save_path = os.path.join(save_directory, file_name)
|
45 |
+
download_file(url, save_path)
|