Disty0 commited on
Commit
ea48fdd
0 Parent(s):

Super-squash branch 'main' using huggingface_hub

Browse files
.gitattributes ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.lz4 filter=lfs diff=lfs merge=lfs -text
12
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
13
+ *.model filter=lfs diff=lfs merge=lfs -text
14
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
15
+ *.npy filter=lfs diff=lfs merge=lfs -text
16
+ *.npz filter=lfs diff=lfs merge=lfs -text
17
+ *.onnx filter=lfs diff=lfs merge=lfs -text
18
+ *.ot filter=lfs diff=lfs merge=lfs -text
19
+ *.parquet filter=lfs diff=lfs merge=lfs -text
20
+ *.pb filter=lfs diff=lfs merge=lfs -text
21
+ *.pickle filter=lfs diff=lfs merge=lfs -text
22
+ *.pkl filter=lfs diff=lfs merge=lfs -text
23
+ *.pt filter=lfs diff=lfs merge=lfs -text
24
+ *.pth filter=lfs diff=lfs merge=lfs -text
25
+ *.rar filter=lfs diff=lfs merge=lfs -text
26
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
27
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
29
+ *.tar filter=lfs diff=lfs merge=lfs -text
30
+ *.tflite filter=lfs diff=lfs merge=lfs -text
31
+ *.tgz filter=lfs diff=lfs merge=lfs -text
32
+ *.wasm filter=lfs diff=lfs merge=lfs -text
33
+ *.xz filter=lfs diff=lfs merge=lfs -text
34
+ *.zip filter=lfs diff=lfs merge=lfs -text
35
+ *.zst filter=lfs diff=lfs merge=lfs -text
36
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
37
+ # Audio files - uncompressed
38
+ *.pcm filter=lfs diff=lfs merge=lfs -text
39
+ *.sam filter=lfs diff=lfs merge=lfs -text
40
+ *.raw filter=lfs diff=lfs merge=lfs -text
41
+ # Audio files - compressed
42
+ *.aac filter=lfs diff=lfs merge=lfs -text
43
+ *.flac filter=lfs diff=lfs merge=lfs -text
44
+ *.mp3 filter=lfs diff=lfs merge=lfs -text
45
+ *.ogg filter=lfs diff=lfs merge=lfs -text
46
+ *.wav filter=lfs diff=lfs merge=lfs -text
47
+ # Image files - uncompressed
48
+ *.bmp filter=lfs diff=lfs merge=lfs -text
49
+ *.gif filter=lfs diff=lfs merge=lfs -text
50
+ *.png filter=lfs diff=lfs merge=lfs -text
51
+ *.tiff filter=lfs diff=lfs merge=lfs -text
52
+ # Image files - compressed
53
+ *.jpg filter=lfs diff=lfs merge=lfs -text
54
+ *.jpeg filter=lfs diff=lfs merge=lfs -text
55
+ *.webp filter=lfs diff=lfs merge=lfs -text
56
+ # Video files - compressed
57
+ *.mp4 filter=lfs diff=lfs merge=lfs -text
58
+ *.webm filter=lfs diff=lfs merge=lfs -text
59
+ danbooru-json_file_list.txt filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ task_categories:
4
+ - text-to-image
5
+ language:
6
+ - en
7
+ tags:
8
+ - anime
9
+ - art
10
+ size_categories:
11
+ - 1M<n<10M
12
+ ---
13
+
14
+ Saved the JSON responses from Danbooru over a span of a month (September 2024).
15
+
16
+ Start id: `1`
17
+ End id: `8180000`
18
+ File count: `8141037`
19
+ Folder names: `int(id / 10000)`
20
+ File names: `id.json`
21
+ Account: `None`
22
+
23
+ Note: `danbooru-json.tar.gz` and `danbooru-json.tar` is the same file. `.gz` one is compressed with gzip.
danbooru-get-json.py ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python
2
+
3
+ import os
4
+ import json
5
+ import time
6
+ import argparse
7
+ import pybooru
8
+ from tqdm import tqdm
9
+
10
+ pybooru.resources.SITE_LIST["shima"] = {"url": "https://shima.donmai.us/"} # get around the government censorship
11
+ client = pybooru.Danbooru('shima')
12
+
13
+ parser = argparse.ArgumentParser(description='Get json files from danbooru')
14
+ parser.add_argument('start', type=int)
15
+ parser.add_argument('end', type=int)
16
+ args = parser.parse_args()
17
+
18
+
19
+ for id in tqdm(range(args.start, args.end)):
20
+ folder = str(int(id / 10000))
21
+ json_path = os.path.join(folder, f"{id}.json")
22
+ if not (os.path.exists(json_path) and os.path.getsize(json_path) != 0):
23
+ try:
24
+ time.sleep(0.25)
25
+ json_data = client.post_show(id)
26
+ os.makedirs(folder, exist_ok=True)
27
+ with open(json_path, "w") as f:
28
+ json.dump(json_data, f)
29
+ except Exception as e:
30
+ str_e = str(e)
31
+ if not ("In _request: 404 - Not Found" in str_e and str_e.endswith(".json")):
32
+ os.makedirs("errors", exist_ok=True)
33
+ error_file = open(f"errors/errors_json{args.start}.txt", 'a')
34
+ error_file.write(f"ERROR: {id} MESSAGE: {str_e}\n")
35
+ error_file.close()
danbooru-json.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1b6cd54c336a496c06dc8f1fd0d3380100ce17c36aa0796a88b7e36b1f5d14fd
3
+ size 32476528640
danbooru-json.tar.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e4fbcce33db39035a1f159c350d07221024fbd95a7c1c4479ec950913d488e67
3
+ size 3586954345
danbooru-json_file_list.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:06aadfb3e0206d4e2d5ee9aed9dd4c5eca155b45e4e2c1d9d966158e9a2c3f0f
3
+ size 136262903