k4d3
/

English
Not-For-All-Audiences
k4d3 commited on
Commit
d87b607
1 Parent(s): 684256c

Signed-off-by: Balazs Horvath <acsipont@gmail.com>

dataset_tools/Convert WebP to PNG.ipynb CHANGED
@@ -19,7 +19,7 @@
19
  "name": "stdout",
20
  "output_type": "stream",
21
  "text": [
22
- "Converted C:\\Users\\kade\\Desktop\\ayaya\\nTaTmTRFHB6ejyqIjWRJDS5HwuSUvpDmN8Un3jTO9rs.webp to C:\\Users\\kade\\Desktop\\ayaya\\nTaTmTRFHB6ejyqIjWRJDS5HwuSUvpDmN8Un3jTO9rs.png\n"
23
  ]
24
  }
25
  ],
@@ -43,8 +43,8 @@
43
  " print(f\"Error converting {webp_path}: {e}\")\n",
44
  "\n",
45
  "#directory = r'E:\\training_dir'\n",
46
- "#directory = r'C:\\Users\\kade\\Desktop\\training_dir_staging'\n",
47
- "directory = r'C:\\Users\\kade\\Desktop\\ayaya'\n",
48
  "convert_webp_to_png(directory)"
49
  ]
50
  }
 
19
  "name": "stdout",
20
  "output_type": "stream",
21
  "text": [
22
+ "Converted C:\\Users\\kade\\Desktop\\training_dir_staging\\1_dharrel\\iee8nodoji731.webp to C:\\Users\\kade\\Desktop\\training_dir_staging\\1_dharrel\\iee8nodoji731.png\n"
23
  ]
24
  }
25
  ],
 
43
  " print(f\"Error converting {webp_path}: {e}\")\n",
44
  "\n",
45
  "#directory = r'E:\\training_dir'\n",
46
+ "directory = r'C:\\Users\\kade\\Desktop\\training_dir_staging'\n",
47
+ "#directory = r'C:\\Users\\kade\\Desktop\\ayaya'\n",
48
  "convert_webp_to_png(directory)"
49
  ]
50
  }
dataset_tools/Escape Parentheses.ipynb CHANGED
@@ -22,10 +22,10 @@
22
  "def escape_parentheses(file_path):\n",
23
  " with open(file_path, 'r') as file:\n",
24
  " content = file.read()\n",
25
- "\n",
26
- " # Escape unescaped parentheses\n",
27
- " content = re.sub(r'(?<!\\\\)([()])', r'\\\\\\1', content)\n",
28
- "\n",
29
  " with open(file_path, 'w') as file:\n",
30
  " file.write(content)\n",
31
  "\n",
@@ -35,11 +35,11 @@
35
  " if file.endswith(\".txt\"):\n",
36
  " file_path = os.path.join(root, file)\n",
37
  " escape_parentheses(file_path)\n",
 
 
 
38
  "\n",
39
- " # Recurse into subdirectories\n",
40
- " process_directory(os.path.join(root, file))\n",
41
- "\n",
42
- "directory_path = r'E:\\training_dir\\wickerbeast'\n",
43
  "process_directory(directory_path)"
44
  ]
45
  }
@@ -60,7 +60,7 @@
60
  "name": "python",
61
  "nbconvert_exporter": "python",
62
  "pygments_lexer": "ipython3",
63
- "version": "3.12.2"
64
  }
65
  },
66
  "nbformat": 4,
 
22
  "def escape_parentheses(file_path):\n",
23
  " with open(file_path, 'r') as file:\n",
24
  " content = file.read()\n",
25
+ " # Escape unescaped opening parentheses\n",
26
+ " content = re.sub(r'(?<!\\\\)(\\()', r'\\\\\\1', content)\n",
27
+ " # Escape unescaped closing parentheses\n",
28
+ " content = re.sub(r'(?<!\\\\)(\\))', r'\\\\\\1', content)\n",
29
  " with open(file_path, 'w') as file:\n",
30
  " file.write(content)\n",
31
  "\n",
 
35
  " if file.endswith(\".txt\"):\n",
36
  " file_path = os.path.join(root, file)\n",
37
  " escape_parentheses(file_path)\n",
38
+ " # Recurse into subdirectories\n",
39
+ " for dir in dirs:\n",
40
+ " process_directory(os.path.join(root, dir))\n",
41
  "\n",
42
+ "directory_path = r'C:\\Users\\kade\\Desktop\\training_dir_staging'\n",
 
 
 
43
  "process_directory(directory_path)"
44
  ]
45
  }
 
60
  "name": "python",
61
  "nbconvert_exporter": "python",
62
  "pygments_lexer": "ipython3",
63
+ "version": "3.12.3"
64
  }
65
  },
66
  "nbformat": 4,
dataset_tools/Insert Tag.ipynb CHANGED
@@ -12,7 +12,7 @@
12
  },
13
  {
14
  "cell_type": "code",
15
- "execution_count": null,
16
  "metadata": {},
17
  "outputs": [],
18
  "source": [
@@ -44,13 +44,28 @@
44
  "directory_path = r'C:\\Users\\kade\\Desktop\\training_dir_staging'\n",
45
  "\n",
46
  "# Execute the function with the desired tag\n",
47
- "insert_tag_in_files(directory_path, 'furrysticker')"
 
48
  ]
49
  }
50
  ],
51
  "metadata": {
 
 
 
 
 
52
  "language_info": {
53
- "name": "python"
 
 
 
 
 
 
 
 
 
54
  }
55
  },
56
  "nbformat": 4,
 
12
  },
13
  {
14
  "cell_type": "code",
15
+ "execution_count": 1,
16
  "metadata": {},
17
  "outputs": [],
18
  "source": [
 
44
  "directory_path = r'C:\\Users\\kade\\Desktop\\training_dir_staging'\n",
45
  "\n",
46
  "# Execute the function with the desired tag\n",
47
+ "insert_tag_in_files(directory_path, 'dharrel')\n",
48
+ "insert_tag_in_files(directory_path, 'jex')"
49
  ]
50
  }
51
  ],
52
  "metadata": {
53
+ "kernelspec": {
54
+ "display_name": "Python 3",
55
+ "language": "python",
56
+ "name": "python3"
57
+ },
58
  "language_info": {
59
+ "codemirror_mode": {
60
+ "name": "ipython",
61
+ "version": 3
62
+ },
63
+ "file_extension": ".py",
64
+ "mimetype": "text/x-python",
65
+ "name": "python",
66
+ "nbconvert_exporter": "python",
67
+ "pygments_lexer": "ipython3",
68
+ "version": "3.12.3"
69
  }
70
  },
71
  "nbformat": 4,
dataset_tools/Remove Tags 2.ipynb CHANGED
@@ -12,7 +12,7 @@
12
  "directory = r'C:\\Users\\kade\\Desktop\\training_dir_staging'\n",
13
  "\n",
14
  "# Tags to remove\n",
15
- "tags_to_remove = ['grandfathered content', '3d \\\\(artwork\\\\)', 'digital media \\\\(artwork\\\\)']\n",
16
  "\n",
17
  "# Function to remove tags from the caption content\n",
18
  "def remove_tags(content):\n",
 
12
  "directory = r'C:\\Users\\kade\\Desktop\\training_dir_staging'\n",
13
  "\n",
14
  "# Tags to remove\n",
15
+ "tags_to_remove = ['grandfathered content', 'rexouium', 'digital media \\\\(artwork\\\\)']\n",
16
  "\n",
17
  "# Function to remove tags from the caption content\n",
18
  "def remove_tags(content):\n",
dataset_tools/Replace Tags and Remove Duplicates.ipynb CHANGED
@@ -14,7 +14,7 @@
14
  },
15
  {
16
  "cell_type": "code",
17
- "execution_count": null,
18
  "metadata": {},
19
  "outputs": [],
20
  "source": [
@@ -48,17 +48,31 @@
48
  "# Directory path\n",
49
  "directory_path = r'C:\\Users\\kade\\Desktop\\training_dir_staging'\n",
50
  "\n",
51
- "process_files(directory_path, 'transparent background', 'black background')\n",
52
  "\n",
53
- "#process_files(directory_path, 'safe', 'rating_safe')\n",
54
- "#process_files(directory_path, 'questionable', 'rating_questionable')\n",
55
- "#process_files(directory_path, 'explicit', 'rating_explicit')\n"
56
  ]
57
  }
58
  ],
59
  "metadata": {
 
 
 
 
 
60
  "language_info": {
61
- "name": "python"
 
 
 
 
 
 
 
 
 
62
  }
63
  },
64
  "nbformat": 4,
 
14
  },
15
  {
16
  "cell_type": "code",
17
+ "execution_count": 1,
18
  "metadata": {},
19
  "outputs": [],
20
  "source": [
 
48
  "# Directory path\n",
49
  "directory_path = r'C:\\Users\\kade\\Desktop\\training_dir_staging'\n",
50
  "\n",
51
+ "#process_files(directory_path, 'transparent background', 'black background')\n",
52
  "\n",
53
+ "process_files(directory_path, 'safe', 'rating_safe')\n",
54
+ "process_files(directory_path, 'questionable', 'rating_questionable')\n",
55
+ "process_files(directory_path, 'explicit', 'rating_explicit')\n"
56
  ]
57
  }
58
  ],
59
  "metadata": {
60
+ "kernelspec": {
61
+ "display_name": "Python 3",
62
+ "language": "python",
63
+ "name": "python3"
64
+ },
65
  "language_info": {
66
+ "codemirror_mode": {
67
+ "name": "ipython",
68
+ "version": 3
69
+ },
70
+ "file_extension": ".py",
71
+ "mimetype": "text/x-python",
72
+ "name": "python",
73
+ "nbconvert_exporter": "python",
74
+ "pygments_lexer": "ipython3",
75
+ "version": "3.12.3"
76
  }
77
  },
78
  "nbformat": 4,
dataset_tools/e621 JSON to txt.ipynb CHANGED
The diff for this file is too large to render. See raw diff
 
ponyxl_loras/dharrel-v1e350.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b4a4116f926aa05ae235f79390ff76fa7bf932199bb9822800643d4f1eb1eba5
3
+ size 240588960