Add files using upload-large-folder tool
Browse files- poyo_Illustrious/Dataset poyo_Illustrious.ipynb +1 -0
- poyo_Illustrious/Train poyo_Illustrious.ipynb +0 -0
- poyo_Illustrious/dataset/00094-1001207375.jpeg +3 -0
- poyo_Illustrious/dataset/00094-1001207375.txt +1 -0
- poyo_Illustrious/dataset/00094-1001207375_0896x1152_sdxl.npz +3 -0
- poyo_Illustrious/dataset/132.jpeg +3 -0
- poyo_Illustrious/dataset/132.txt +1 -0
- poyo_Illustrious/dataset/132_1024x0512_sdxl.npz +3 -0
- poyo_Illustrious/dataset/14225.jpeg +3 -0
- poyo_Illustrious/dataset/14225.txt +1 -0
- poyo_Illustrious/dataset/14225_1024x0512_sdxl.npz +3 -0
- poyo_Illustrious/dataset/385ca87a-a619-498c-bcb7-241333082a02.jpeg +3 -0
- poyo_Illustrious/dataset/385ca87a-a619-498c-bcb7-241333082a02.txt +1 -0
- poyo_Illustrious/dataset/385ca87a-a619-498c-bcb7-241333082a02_0896x1152_sdxl.npz +3 -0
- poyo_Illustrious/dataset/4f84ca45-7e8e-4161-81d6-04245de3e52c.txt +1 -0
- poyo_Illustrious/dataset/598a6e1e-e15e-4073-924e-c5039853e6d0.txt +1 -0
- poyo_Illustrious/dataset/598a6e1e-e15e-4073-924e-c5039853e6d0_0896x1152_sdxl.npz +3 -0
- poyo_Illustrious/dataset/7780ddb5-cde8-4175-a651-02ce4c578809.txt +1 -0
- poyo_Illustrious/dataset/78a4f45c-c84f-4f78-a187-6fccf3ca0053.jpeg +3 -0
- poyo_Illustrious/dataset/78a4f45c-c84f-4f78-a187-6fccf3ca0053.txt +1 -0
- poyo_Illustrious/dataset/882e896b-28d9-4abd-89b8-1bafe3803f97.jpeg +3 -0
- poyo_Illustrious/dataset/882e896b-28d9-4abd-89b8-1bafe3803f97.txt +1 -0
- poyo_Illustrious/dataset/8ad04cd4-d067-4e80-86af-2d2010389cae.txt +1 -0
- poyo_Illustrious/dataset/9a05e51d-62ff-428f-aa88-c2c3b8d735b5.txt +1 -0
- poyo_Illustrious/dataset/A45NPY8KDBPTBR60HKN1102Z90.txt +1 -0
- poyo_Illustrious/dataset/AKNNM01TFJPFZF053TKN62PN90.txt +1 -0
- poyo_Illustrious/dataset/BBFRCD1T8BZP8N1CRX3NXX07H0.txt +1 -0
- poyo_Illustrious/dataset/BQ97K5XCVBZSAQ3HTVPZ82EK90.txt +1 -0
- poyo_Illustrious/dataset/CTD32FQ86VKKT69J1GW0VF3RD0.txt +1 -0
- poyo_Illustrious/dataset/K58S7Y77W3D4ATWX62HHCNF7J0.txt +1 -0
- poyo_Illustrious/dataset/K5SNPJ4Z4BXWYR5NYE6NWFEBP0.txt +1 -0
- poyo_Illustrious/dataset/R4Z6QWSEGHPR330ZB55ED0VM00.txt +1 -0
- poyo_Illustrious/dataset/RZ6QR9EEVSHGT5WXVA316XM2Y0.txt +1 -0
- poyo_Illustrious/dataset/b46bf35a-593f-4bda-8263-328117fd1a40.txt +1 -0
- poyo_Illustrious/dataset/coffeee.txt +1 -0
- poyo_Illustrious/dataset/dont be sad_hug.txt +1 -0
- poyo_Illustrious/dataset/how_my_chu_how_you_feeling.txt +1 -0
- poyo_Illustrious/dataset/image.txt +1 -0
- poyo_Illustrious/dataset/image002.txt +1 -0
- poyo_Illustrious/dataset/image003.txt +1 -0
- poyo_Illustrious/dataset/image004.txt +1 -0
- poyo_Illustrious/dataset/image005.txt +1 -0
- poyo_Illustrious/dataset/image008.txt +1 -0
- poyo_Illustrious/dataset/image010.txt +1 -0
- poyo_Illustrious/dataset/image032.txt +1 -0
- poyo_Illustrious/dataset/pout_1.txt +1 -0
- poyo_Illustrious/dataset/sergey004_boxers_xx_1.txt +1 -0
- poyo_Illustrious/dataset/silly_micreo_1.txt +1 -0
- poyo_Illustrious/dataset_config.toml +17 -0
- poyo_Illustrious/training_config.toml +55 -0
poyo_Illustrious/Dataset poyo_Illustrious.ipynb
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"cells":[{"cell_type":"markdown","metadata":{"id":"rmCPmqFL6hCQ"},"source":["# 📊 Dataset Maker by Hollowstrawberry\n","\n","This is based on the work of [Kohya-ss](https://github.com/kohya-ss/sd-scripts) and [Linaqruf](https://colab.research.google.com/github/Linaqruf/kohya-trainer/blob/main/kohya-LoRA-dreambooth.ipynb). Thank you!"]},{"cell_type":"markdown","metadata":{"id":"NrMSe-zwH6K1"},"source":["### ⭕ Disclaimer\n","The purpose of this document is to research bleeding-edge technologies in the field of machine learning inference. \n","Please read and follow the [Google Colab guidelines](https://research.google.com/colaboratory/faq.html) and its [Terms of Service](https://research.google.com/colaboratory/tos_v3.html)."]},{"cell_type":"markdown","metadata":{"id":"-rdgF2AWLS2h"},"source":["| |GitHub|🇬🇧 English|🇪🇸 Spanish|\n","|:--|:-:|:-:|:-:|\n","| 🏠 **Homepage** | [](https://github.com/hollowstrawberry/kohya-colab) | | |\n","| 📊 **Dataset Maker** | [](https://github.com/hollowstrawberry/kohya-colab/blob/main/Dataset_Maker.ipynb) | [](https://colab.research.google.com/github/hollowstrawberry/kohya-colab/blob/main/Dataset_Maker.ipynb) | [](https://colab.research.google.com/github/hollowstrawberry/kohya-colab/blob/main/Spanish_Dataset_Maker.ipynb) |\n","| ⭐ **Lora Trainer** | [](https://github.com/hollowstrawberry/kohya-colab/blob/main/Lora_Trainer.ipynb) | [](https://colab.research.google.com/github/hollowstrawberry/kohya-colab/blob/main/Lora_Trainer.ipynb) | [](https://colab.research.google.com/github/hollowstrawberry/kohya-colab/blob/main/Spanish_Lora_Trainer.ipynb) |\n","| 🌟 **XL Lora Trainer** | [](https://github.com/hollowstrawberry/kohya-colab/blob/main/Lora_Trainer_XL.ipynb) | [](https://colab.research.google.com/github/hollowstrawberry/kohya-colab/blob/main/Lora_Trainer_XL.ipynb) | |"]},{"cell_type":"code","execution_count":1,"metadata":{"id":"cBa7KdewQ4BU","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1743519703150,"user_tz":-240,"elapsed":18449,"user":{"displayName":"Сергей Григорьев (Sergey004)","userId":"04354315389975155845"}},"outputId":"02623985-f43c-4ef9-b18a-61affcb0a4ab","cellView":"form"},"outputs":[{"output_type":"stream","name":"stdout","text":["📂 Connecting to Google Drive...\n","Mounted at /content/drive\n","✅ Project poyo_Illustrious is ready!\n"]}],"source":["import os\n","from IPython import get_ipython\n","from IPython.display import display, Markdown\n","\n","COLAB = True\n","\n","if COLAB:\n"," from google.colab.output import clear as clear_output\n","else:\n"," from IPython.display import clear_output\n","\n","#@title ## 🚩 Start Here\n","\n","#@markdown ### 1️⃣ Setup\n","#@markdown This cell will load some requirements and create the necessary folders in your Google Drive. <p>\n","#@markdown Your project name can't contain spaces but it can contain a single / to make a subfolder in your dataset.\n","project_name = \"poyo_Illustrious\" #@param {type:\"string\"}\n","project_name = project_name.strip()\n","#@markdown The folder structure doesn't matter and is purely for comfort. Make sure to always pick the same one. I like organizing by project.\n","folder_structure = \"Organize by project (MyDrive/Loras/project_name/dataset)\" #@param [\"Organize by category (MyDrive/lora_training/datasets/project_name)\", \"Organize by project (MyDrive/Loras/project_name/dataset)\"]\n","\n","if not project_name or any(c in project_name for c in \" .()\\\"'\\\\\") or project_name.count(\"/\") > 1:\n"," print(\"Please write a valid project_name.\")\n","else:\n"," if COLAB and not os.path.exists('/content/drive'):\n"," from google.colab import drive\n"," print(\"📂 Connecting to Google Drive...\")\n"," drive.mount('/content/drive')\n","\n"," project_base = project_name if \"/\" not in project_name else project_name[:project_name.rfind(\"/\")]\n"," project_subfolder = project_name if \"/\" not in project_name else project_name[project_name.rfind(\"/\")+1:]\n","\n"," root_dir = \"/content\" if COLAB else \"~/Loras\"\n"," deps_dir = os.path.join(root_dir, \"deps\")\n","\n"," if \"/Loras\" in folder_structure:\n"," main_dir = os.path.join(root_dir, \"drive/MyDrive/Loras\") if COLAB else root_dir\n"," config_folder = os.path.join(main_dir, project_base)\n"," images_folder = os.path.join(main_dir, project_base, \"dataset\")\n"," if \"/\" in project_name:\n"," images_folder = os.path.join(images_folder, project_subfolder)\n"," else:\n"," main_dir = os.path.join(root_dir, \"drive/MyDrive/lora_training\") if COLAB else root_dir\n"," config_folder = os.path.join(main_dir, \"config\", project_name)\n"," images_folder = os.path.join(main_dir, \"datasets\", project_name)\n","\n"," for dir in [main_dir, deps_dir, images_folder, config_folder]:\n"," os.makedirs(dir, exist_ok=True)\n","\n"," print(f\"✅ Project {project_name} is ready!\")\n"," step1_installed_flag = True\n"]},{"cell_type":"code","execution_count":null,"metadata":{"cellView":"form","id":"afu5dCKTV31E","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1742837397064,"user_tz":-240,"elapsed":12122,"user":{"displayName":"Ольга","userId":"01931168844080915348"}},"outputId":"57606a01-0b94-4457-84a8-2d91b443f1ab"},"outputs":[{"output_type":"stream","name":"stdout","text":["📷 No results found\n"]}],"source":["if \"step1_installed_flag\" not in globals():\n"," raise Exception(\"Please run step 1 first!\")\n","\n","import json\n","import time\n","from urllib.request import urlopen, Request\n","\n","#@markdown ### 2️⃣ Scrape images from Gelbooru\n","\n","#@markdown We will grab images from the popular anime gallery [Gelbooru](https://gelbooru.com/). Images are sorted by tags, including poses, scenes, character traits, character names, artists, etc. <p>\n","#@markdown * If you instead want to use your own images, upload them to your Google Drive's `Loras/project_name/dataset` folder.\n","#@markdown * If you instead want to download screencaps of anime episodes, try [this other colab by another person](https://colab.research.google.com/drive/1oBSntB40BKzNmKceXUlkXzujzdQw-Ci7). It's more complicated though.\n","\n","#@markdown Up to 1000 images may be downloaded by this step in just one minute. Don't abuse it. <p>\n","#@markdown Your target tags should include the relevant tags for your character/concept/artstyle, and exclude undesired tags (for example, explicit images may affect learning).\n","#@markdown Separate words with underscores, separate tags with spaces, and use - to exclude a tag. You can also include a minimum score: `score:>10`\n","tags = \"1boy -sex -bdsm -loli -greyscale -monochrome milkytiger\" #@param {type:\"string\"}\n","##@markdown If an image is bigger than this resolution a smaller version will be downloaded instead.\n","max_resolution = 3072 #param {type:\"slider\", min:1024, max:8196, step:1024}\n","##@markdown Posts with a parent post are often minor variations of the same image.\n","include_posts_with_parent = True #param {type:\"boolean\"}\n","\n","tags = tags.replace(\" \", \"+\")\\\n"," .replace(\"(\", \"%28\")\\\n"," .replace(\")\", \"%29\")\\\n"," .replace(\":\", \"%3a\")\\\n"," .replace(\"&\", \"%26\")\\\n","\n","url = \"https://gelbooru.com/index.php?page=dapi&json=1&s=post&q=index&limit=100&tags={}\".format(tags)\n","user_agent = \"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; Googlebot/2.1; +http://www.google.com/bot.html) Chrome/93.0.4577.83 Safari/537.36\"\n","limit = 100 # hardcoded by gelbooru\n","total_limit = 1000 # you can edit this if you want but I wouldn't recommend it\n","supported_types = (\".png\", \".jpg\", \".jpeg\")\n","\n","def ubuntu_deps():\n"," print(\"🏭 Installing dependencies...\\n\")\n"," !apt -y install aria2\n"," return not get_ipython().__dict__['user_ns']['_exit_code']\n","\n","if \"step2_installed_flag\" not in globals():\n"," if ubuntu_deps():\n"," clear_output()\n"," step2_installed_flag = True\n"," else:\n"," print(\"❌ Error installing dependencies, attempting to continue anyway...\")\n","\n","def get_json(url):\n"," with urlopen(Request(url, headers={\"User-Agent\": user_agent})) as page:\n"," return json.load(page)\n","\n","def filter_images(data):\n"," return [p[\"file_url\"] if p[\"width\"]*p[\"height\"] <= max_resolution**2 else p[\"sample_url\"]\n"," for p in data[\"post\"]\n"," if (p[\"parent_id\"] == 0 or include_posts_with_parent)\n"," and p[\"file_url\"].lower().endswith(supported_types)]\n","\n","def download_images():\n"," data = get_json(url)\n"," count = data[\"@attributes\"][\"count\"]\n","\n"," if count == 0:\n"," print(\"📷 No results found\")\n"," return\n","\n"," print(f\"🎯 Found {count} results\")\n"," test_url = \"https://gelbooru.com/index.php?page=post&s=list&tags={}\".format(tags)\n"," display(Markdown(f\"[Click here to open in browser!]({test_url})\"))\n"," print (f\"🔽 Will download to {images_folder.replace('/content/drive/', '')} (A confirmation box should appear below, otherwise run this cell again)\")\n"," inp = input(\"��� Enter the word 'yes' if you want to proceed with the download: \")\n","\n"," if inp.lower().strip() != 'yes':\n"," print(\"❌ Download cancelled\")\n"," return\n","\n"," print(\"📩 Grabbing image list...\")\n","\n"," image_urls = set()\n"," image_urls = image_urls.union(filter_images(data))\n"," for i in range(total_limit // limit):\n"," count -= limit\n"," if count <= 0:\n"," break\n"," time.sleep(0.1)\n"," image_urls = image_urls.union(filter_images(get_json(url+f\"&pid={i+1}\")))\n","\n"," scrape_file = os.path.join(config_folder, f\"scrape_{project_subfolder}.txt\")\n"," with open(scrape_file, \"w\") as f:\n"," f.write(\"\\n\".join(image_urls))\n","\n"," print(f\"🌐 Saved links to {scrape_file}\\n\\n🔁 Downloading images...\\n\")\n"," old_img_count = len([f for f in os.listdir(images_folder) if f.lower().endswith(supported_types)])\n","\n"," os.chdir(images_folder)\n"," !aria2c --console-log-level=warn -c -x 16 -k 1M -s 16 -i {scrape_file}\n","\n"," new_img_count = len([f for f in os.listdir(images_folder) if f.lower().endswith(supported_types)])\n"," print(f\"\\n✅ Downloaded {new_img_count - old_img_count} images.\")\n","\n","download_images()\n"]},{"cell_type":"code","execution_count":null,"metadata":{"cellView":"form","id":"b218DEEMpwzB","colab":{"base_uri":"https://localhost:8080/"},"outputId":"5be42034-58fa-4a52-e174-7cf7a3f7f038"},"outputs":[{"output_type":"stream","name":"stdout","text":["\n","💿 Analyzing dataset...\n","\n"," 100% |█████████████████| 187/187 [86.3ms elapsed, 0s remaining, 2.2K samples/s] \n"]},{"output_type":"stream","name":"stderr","text":["INFO:eta.core.utils: 100% |█████████████████| 187/187 [86.3ms elapsed, 0s remaining, 2.2K samples/s] \n"]},{"output_type":"stream","name":"stdout","text":["Downloading model from 'https://openaipublic.azureedge.net/clip/models/40d365715913c9da98579312b702a82c18be219cc2a73407c4526f58eba950af/ViT-B-32.pt'...\n"]},{"output_type":"stream","name":"stderr","text":["INFO:fiftyone.core.models:Downloading model from 'https://openaipublic.azureedge.net/clip/models/40d365715913c9da98579312b702a82c18be219cc2a73407c4526f58eba950af/ViT-B-32.pt'...\n"]},{"output_type":"stream","name":"stdout","text":[" 100% |██████| 2.6Gb/2.6Gb [4.9s elapsed, 0s remaining, 661.0Mb/s] \n"]},{"output_type":"stream","name":"stderr","text":["INFO:eta.core.utils: 100% |██████| 2.6Gb/2.6Gb [4.9s elapsed, 0s remaining, 661.0Mb/s] \n"]},{"output_type":"stream","name":"stdout","text":["Downloading CLIP tokenizer...\n"]},{"output_type":"stream","name":"stderr","text":["INFO:fiftyone.utils.clip.zoo:Downloading CLIP tokenizer...\n"]},{"output_type":"stream","name":"stdout","text":[" 100% |█████| 10.4Mb/10.4Mb [18.3ms elapsed, 0s remaining, 566.2Mb/s] \n"]},{"output_type":"stream","name":"stderr","text":["INFO:eta.core.utils: 100% |█████| 10.4Mb/10.4Mb [18.3ms elapsed, 0s remaining, 566.2Mb/s] \n"]}],"source":["if \"step1_installed_flag\" not in globals():\n"," raise Exception(\"Please run step 1 first!\")\n","\n","#@markdown ### 3️⃣ Curate your images\n","#@markdown We will find duplicate images with the FiftyOne AI, and mark them with `delete`. <p>\n","#@markdown Then, an interactive area will appear below this cell that lets you visualize all your images and manually mark with `delete` to the ones you don't like. <p>\n","#@markdown If the interactive area appears blank for over a minute, try enabling cookies and removing tracking protection for the Google Colab website, as they may break it.\n","#@markdown Regardless, you can save your changes by sending Enter in the input box above the interactive area.<p>\n","#@markdown This is how similar 2 images must be to be marked for deletion. I recommend 0.97 to 0.99:\n","similarity_threshold = 0.985 #@param {type:\"number\"}\n","\n","\n","os.chdir(root_dir)\n","model_name = \"clip-vit-base32-torch\"\n","supported_types = (\".png\", \".jpg\", \".jpeg\")\n","img_count = len(os.listdir(images_folder))\n","batch_size = min(250, img_count)\n","\n","if \"step3_installed_flag\" not in globals():\n"," print(\"🏭 Installing dependencies...\\n\")\n"," !pip -q install fiftyone ftfy\n"," !pip -q install fiftyone-db-ubuntu2204\n"," if not get_ipython().__dict__['user_ns']['_exit_code']:\n"," clear_output()\n"," step3_installed_flag = True\n"," else:\n"," print(\"❌ Error installing dependencies, attempting to continue anyway...\")\n","\n","import numpy as np\n","import fiftyone as fo\n","import fiftyone.zoo as foz\n","from fiftyone import ViewField as F\n","from sklearn.metrics.pairwise import cosine_similarity\n","\n","non_images = [f for f in os.listdir(images_folder) if not f.lower().endswith(supported_types)]\n","if non_images:\n"," print(f\"💥 Error: Found non-image file {non_images[0]} - This program doesn't allow it. Sorry! Use the Extras at the bottom to clean the folder.\")\n","elif img_count == 0:\n"," print(f\"💥 Error: No images found in {images_folder}\")\n","else:\n"," print(\"\\n💿 Analyzing dataset...\\n\")\n"," dataset = fo.Dataset.from_dir(images_folder, dataset_type=fo.types.ImageDirectory)\n"," model = foz.load_zoo_model(model_name)\n"," embeddings = dataset.compute_embeddings(model, batch_size=batch_size)\n","\n"," batch_embeddings = np.array_split(embeddings, batch_size)\n"," similarity_matrices = []\n"," max_size_x = max(array.shape[0] for array in batch_embeddings)\n"," max_size_y = max(array.shape[1] for array in batch_embeddings)\n","\n"," for i, batch_embedding in enumerate(batch_embeddings):\n"," similarity = cosine_similarity(batch_embedding)\n"," #Pad 0 for np.concatenate\n"," padded_array = np.zeros((max_size_x, max_size_y))\n"," padded_array[0:similarity.shape[0], 0:similarity.shape[1]] = similarity\n"," similarity_matrices.append(padded_array)\n","\n"," similarity_matrix = np.concatenate(similarity_matrices, axis=0)\n"," similarity_matrix = similarity_matrix[0:embeddings.shape[0], 0:embeddings.shape[0]]\n","\n"," similarity_matrix = cosine_similarity(embeddings)\n"," similarity_matrix -= np.identity(len(similarity_matrix))\n","\n"," dataset.match(F(\"max_similarity\") > similarity_threshold)\n"," dataset.tags = [\"delete\", \"has_duplicates\"]\n","\n"," id_map = [s.id for s in dataset.select_fields([\"id\"])]\n"," samples_to_remove = set()\n"," samples_to_keep = set()\n","\n"," for idx, sample in enumerate(dataset):\n"," if sample.id not in samples_to_remove:\n"," # Keep the first instance of two duplicates\n"," samples_to_keep.add(sample.id)\n","\n"," dup_idxs = np.where(similarity_matrix[idx] > similarity_threshold)[0]\n"," for dup in dup_idxs:\n"," # We kept the first instance so remove all other duplicates\n"," samples_to_remove.add(id_map[dup])\n","\n"," if len(dup_idxs) > 0:\n"," sample.tags.append(\"has_duplicates\")\n"," sample.save()\n"," else:\n"," sample.tags.append(\"delete\")\n"," sample.save()\n","\n"," clear_output()\n","\n"," sidebar_groups = fo.DatasetAppConfig.default_sidebar_groups(dataset)\n"," for group in sidebar_groups[1:]:\n"," group.expanded = False\n"," dataset.app_config.sidebar_groups = sidebar_groups\n"," dataset.save()\n"," session = fo.launch_app(dataset)\n","\n"," print(\"❗ Wait a minute for the session to load. If it doesn't, read above.\")\n"," print(\"❗ When it's ready, you'll see a grid of your images.\")\n"," print(\"❗ On the left side enable \\\"sample tags\\\" to visualize the images marked for deletion.\")\n"," print(\"❗ You can mark your own images with the \\\"delete\\\" label by selecting them and pressing the tag icon at the top.\")\n"," input(\"⭕ When you're done, enter something here to save your changes: \")\n","\n"," print(\"💾 Saving...\")\n","\n"," marked = [s for s in dataset if \"delete\" in s.tags]\n"," dataset.remove_samples(marked)\n"," previous_folder = images_folder[:images_folder.rfind(\"/\")]\n"," dataset.export(export_dir=os.path.join(images_folder, project_subfolder), dataset_type=fo.types.ImageDirectory)\n","\n"," temp_suffix = \"_temp\"\n"," !mv {images_folder} {images_folder}{temp_suffix}\n"," !mv {images_folder}{temp_suffix}/{project_subfolder} {images_folder}\n"," !rm -r {images_folder}{temp_suffix}\n","\n"," session.refresh()\n"," fo.close_app()\n"," clear_output()\n","\n"," print(f\"\\n✅ Removed {len(marked)} images from dataset. You now have {len(os.listdir(images_folder))} images.\")\n"]},{"cell_type":"code","source":["!pip install transformers -U"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"3CzwS7CjD4HG","executionInfo":{"status":"ok","timestamp":1735033771925,"user_tz":-240,"elapsed":7126,"user":{"displayName":"Сергей Григорьев (Sergey004)","userId":"04354315389975155845"}},"outputId":"eb4b43dd-0e49-46eb-fc62-a89f039500a4"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["Requirement already satisfied: transformers in /usr/local/lib/python3.10/dist-packages (4.47.1)\n","Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from transformers) (3.16.1)\n","Requirement already satisfied: huggingface-hub<1.0,>=0.24.0 in /usr/local/lib/python3.10/dist-packages (from transformers) (0.27.0)\n","Requirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.10/dist-packages (from transformers) (1.26.4)\n","Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.10/dist-packages (from transformers) (24.2)\n","Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.10/dist-packages (from transformers) (6.0.2)\n","Requirement already satisfied: regex!=2019.12.17 in /usr/local/lib/python3.10/dist-packages (from transformers) (2024.11.6)\n","Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from transformers) (2.32.3)\n","Requirement already satisfied: tokenizers<0.22,>=0.21 in /usr/local/lib/python3.10/dist-packages (from transformers) (0.21.0)\n","Requirement already satisfied: safetensors>=0.4.1 in /usr/local/lib/python3.10/dist-packages (from transformers) (0.4.5)\n","Requirement already satisfied: tqdm>=4.27 in /usr/local/lib/python3.10/dist-packages (from transformers) (4.67.1)\n","Requirement already satisfied: fsspec>=2023.5.0 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub<1.0,>=0.24.0->transformers) (2024.10.0)\n","Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub<1.0,>=0.24.0->transformers) (4.12.2)\n","Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests->transformers) (3.4.0)\n","Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests->transformers) (3.10)\n","Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests->transformers) (2.2.3)\n","Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests->transformers) (2024.12.14)\n"]}]},{"cell_type":"code","execution_count":2,"metadata":{"cellView":"form","id":"sl4FD7Mz-uea","colab":{"base_uri":"https://localhost:8080/"},"outputId":"435e49e9-813b-47d7-f523-c6552a641532","executionInfo":{"status":"ok","timestamp":1743520101603,"user_tz":-240,"elapsed":398020,"user":{"displayName":"Сергей Григорьев (Sergey004)","userId":"04354315389975155845"}}},"outputs":[{"output_type":"stream","name":"stdout","text":["📊 Tagging complete. Here are the top 50 tags in your dataset:\n","animal ears (35)\n","male focus (35)\n","furry male (35)\n","solo (34)\n","short hair (34)\n","1boy (34)\n","furry (34)\n","yellow eyes (33)\n","white hair (33)\n","looking at viewer (27)\n","blush (26)\n","mouse ears (26)\n","long sleeves (22)\n","sweater (22)\n","body fur (21)\n","tail (20)\n","white fur (20)\n","closed mouth (18)\n","black sweater (16)\n","upper body (16)\n","simple background (15)\n","standing (14)\n","thick eyebrows (13)\n","grey background (13)\n","pants (12)\n","outdoors (11)\n","black pants (10)\n","mouse tail (10)\n","cowboy shot (9)\n","smile (9)\n","male child (7)\n","holding (7)\n","open mouth (7)\n","shirt (7)\n","animal hands (7)\n",":< (7)\n","indoors (6)\n","potted plant (6)\n","full body (6)\n",":3 (6)\n","plant (5)\n","portrait (5)\n","chibi (5)\n","day (5)\n","tree (5)\n","white sweater (5)\n","blurry (5)\n","whiskers (5)\n","night (5)\n","english text (4)\n"]}],"source":["if \"step1_installed_flag\" not in globals():\n"," raise Exception(\"Please run step 1 first!\")\n","\n","#@markdown ### 4️⃣ Tag your images\n","#@markdown We will be using AI to automatically tag your images, specifically [Waifu Diffusion](https://huggingface.co/SmilingWolf/wd-v1-4-swinv2-tagger-v2) in the case of anime and [BLIP](https://huggingface.co/spaces/Salesforce/BLIP) in the case of photos.\n","#@markdown Giving tags/captions to your images allows for much better training. This process should take a couple minutes. <p>\n","method = \"Anime tags\" #@param [\"Anime tags\", \"Photo captions\"]\n","#@markdown **Anime:** The threshold is the minimum level of confidence the tagger must have in order to include a tag. Lower threshold = More tags. Recommended 0.35 to 0.5\n","tag_threshold = 0.35 #@param {type:\"slider\", min:0.0, max:1.0, step:0.01}\n","blacklist_tags = \"bangs, breasts, multicolored hair, two-tone hair, gradient hair, virtual youtuber, parody, style parody, official alternate costume, official alternate hairstyle, official alternate hair length, alternate costume, alternate hairstyle, alternate hair length, alternate hair color\" #@param {type:\"string\"}\n","#@markdown **Photos:** The minimum and maximum length of tokens/words in each caption.\n","caption_min = 10 #@param {type:\"number\"}\n","caption_max = 75 #@param {type:\"number\"}\n","\n","%env PYTHONPATH=/env/python\n","os.chdir(root_dir)\n","kohya = \"/content/kohya-trainer\"\n","if not os.path.exists(kohya):\n"," !git clone https://github.com/kohya-ss/sd-scripts {kohya}\n"," os.chdir(kohya)\n"," !git reset --hard 9a67e0df390033a89f17e70df5131393692c2a55\n"," os.chdir(root_dir)\n","\n","if \"tags\" in method:\n"," if \"step4a_installed_flag\" not in globals() or \"step4b_installed_flag\" in globals():\n"," print(\"\\n🏭 Installing dependencies...\\n\")\n"," !pip install accelerate==0.25.0 diffusers[torch]==0.25.0 einops==0.6.0 tensorflow==2.15.0 \\\n"," keras==2.15.0 transformers safetensors huggingface-hub==0.22.0 torchvision albumentations \\\n"," jax==0.4.23 jaxlib==0.4.23 flax==0.7.5\n"," if not get_ipython().__dict__['user_ns']['_exit_code']:\n"," clear_output()\n"," step4a_installed_flag = True\n"," else:\n"," print(\"❌ Error installing dependencies, trying to continue anyway...\")\n","\n"," print(\"\\n🚶♂️ Launching program...\\n\")\n","\n"," os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'\n"," %env PYTHONPATH={kohya}\n"," !python {kohya}/finetune/tag_images_by_wd14_tagger.py \\\n"," {images_folder} \\\n"," --repo_id=SmilingWolf/wd-v1-4-swinv2-tagger-v2 \\\n"," --model_dir={root_dir} \\\n"," --thresh={tag_threshold} \\\n"," --batch_size=8 \\\n"," --caption_extension=.txt \\\n"," --force_download\n","\n"," if not get_ipython().__dict__['user_ns']['_exit_code']:\n"," print(\"removing underscores and blacklist...\")\n"," blacklisted_tags = [t.strip() for t in blacklist_tags.split(\",\")]\n"," from collections import Counter\n"," top_tags = Counter()\n"," for txt in [f for f in os.listdir(images_folder) if f.lower().endswith(\".txt\")]:\n"," with open(os.path.join(images_folder, txt), 'r') as f:\n"," tags = [t.strip() for t in f.read().split(\",\")]\n"," tags = [t.replace(\"_\", \" \") if len(t) > 3 else t for t in tags]\n"," tags = [t for t in tags if t not in blacklisted_tags]\n"," top_tags.update(tags)\n"," with open(os.path.join(images_folder, txt), 'w') as f:\n"," f.write(\", \".join(tags))\n","\n"," %env PYTHONPATH=/env/python\n"," clear_output()\n"," print(f\"📊 Tagging complete. Here are the top 50 tags in your dataset:\")\n"," print(\"\\n\".join(f\"{k} ({v})\" for k, v in top_tags.most_common(50)))\n","\n","\n","else: # Photos\n"," if \"step4b_installed_flag\" not in globals() or \"step4a_installed_flag\" in globals():\n"," print(\"\\n🏭 Installing dependencies...\\n\")\n"," !pip install timm==0.6.12 fairscale==0.4.13 transformers==4.26.0 requests \\\n"," accelerate==0.25.0 diffusers[torch]==0.25.0 einops==0.6.0 safetensors \\\n"," jax==0.4.23 jaxlib==0.4.23 flax==0.7.5 huggingface-hub==0.22.0\n"," if not get_ipython().__dict__['user_ns']['_exit_code']:\n"," clear_output()\n"," step4b_installed_flag = True\n"," else:\n"," print(\"❌ Error installing dependencies, trying to continue anyway...\")\n","\n"," print(\"\\n🚶♂️ Launching program...\\n\")\n","\n"," os.chdir(kohya)\n"," %env PYTHONPATH={kohya}\n"," !python {kohya}/finetune/make_captions.py \\\n"," {images_folder} \\\n"," --beam_search \\\n"," --max_data_loader_n_workers=2 \\\n"," --batch_size=1 \\\n"," --min_length={caption_min} \\\n"," --max_length={caption_max} \\\n"," --caption_extension=.txt\n","\n"," if not get_ipython().__dict__['user_ns']['_exit_code']:\n"," import random\n"," captions = [f for f in os.listdir(images_folder) if f.lower().endswith(\".txt\")]\n"," sample = []\n"," for txt in random.sample(captions, min(10, len(captions))):\n"," with open(os.path.join(images_folder, txt), 'r') as f:\n"," sample.append(f.read())\n","\n"," os.chdir(root_dir)\n"," %env PYTHONPATH=/env/python\n"," clear_output()\n"," print(f\"📊 Captioning complete. Here are {len(sample)} example captions from your dataset:\")\n"," print(\"\".join(sample))\n","\n"]},{"cell_type":"code","execution_count":3,"metadata":{"cellView":"form","id":"WBFik7accyDz","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1743520101924,"user_tz":-240,"elapsed":315,"user":{"displayName":"Сергей Григорьев (Sergey004)","userId":"04354315389975155845"}},"outputId":"88d9f071-f37f-4ae2-dd1f-89b7240f60d1"},"outputs":[{"output_type":"stream","name":"stdout","text":["\n","📎 Applied new activation tag(s): poyo\n","\n","🚮 Removed 128 tags.\n","\n","✅ Done! Check your updated tags in the Extras below.\n"]}],"source":["if \"step1_installed_flag\" not in globals():\n"," raise Exception(\"Please run step 1 first!\")\n","\n","#@markdown ### 5️⃣ Curate your tags\n","#@markdown Modify your dataset's tags. You can run this cell multiple times with different parameters. <p>\n","\n","#@markdown Put an activation tag at the start of every text file. This is useful to make learning better and activate your Lora easier. Set `keep_tokens` to 1 when training.<p>\n","#@markdown Common tags that are removed such as hair color, etc. will be \"absorbed\" by your activation tag.\n","global_activation_tag = \"poyo\" #@param {type:\"string\"}\n","remove_tags = \"candy, musical note, gradient, white background, background, green eyes, heart, gradient background, solo, artist name, traditional media, multicolored background, checkered background, purple background, looking at viewer, simple background, male focus, brown eyes, feet out of frame, underwear only, window, sitting, couch, night sky, night, starry sky, brown fur\" #@param {type:\"string\"}\n","#@markdown \n","\n","#@markdown In this advanced section, you can search text files containing matching tags, and replace them with less/more/different tags. If you select the checkbox below, any extra tags will be put at the start of the file, letting you assign different activation tags to different parts of your dataset. Still, you may want a more advanced tool for this.\n","search_tags = \"\" #@param {type:\"string\"}\n","replace_with = \"\" #@param {type:\"string\"}\n","search_mode = \"OR\" #@param [\"OR\", \"AND\"]\n","new_becomes_activation_tag = False #@param {type:\"boolean\"}\n","#@markdown These may be useful sometimes. Will remove existing activation tags, be careful.\n","sort_alphabetically = False #@param {type:\"boolean\"}\n","remove_duplicates = False #@param {type:\"boolean\"}\n","\n","def split_tags(tagstr):\n"," return [s.strip() for s in tagstr.split(\",\") if s.strip()]\n","\n","activation_tag_list = split_tags(global_activation_tag)\n","remove_tags_list = split_tags(remove_tags)\n","search_tags_list = split_tags(search_tags)\n","replace_with_list = split_tags(replace_with)\n","replace_new_list = [t for t in replace_with_list if t not in search_tags_list]\n","\n","replace_with_list = [t for t in replace_with_list if t not in replace_new_list]\n","replace_new_list.reverse()\n","activation_tag_list.reverse()\n","\n","remove_count = 0\n","replace_count = 0\n","\n","for txt in [f for f in os.listdir(images_folder) if f.lower().endswith(\".txt\")]:\n","\n"," with open(os.path.join(images_folder, txt), 'r') as f:\n"," tags = [s.strip() for s in f.read().split(\",\")]\n","\n"," if remove_duplicates:\n"," tags = list(set(tags))\n"," if sort_alphabetically:\n"," tags.sort()\n","\n"," for rem in remove_tags_list:\n"," if rem in tags:\n"," remove_count += 1\n"," tags.remove(rem)\n","\n"," if \"AND\" in search_mode and all(r in tags for r in search_tags_list) \\\n"," or \"OR\" in search_mode and any(r in tags for r in search_tags_list):\n"," replace_count += 1\n"," for rem in search_tags_list:\n"," if rem in tags:\n"," tags.remove(rem)\n"," for add in replace_with_list:\n"," if add not in tags:\n"," tags.append(add)\n"," for new in replace_new_list:\n"," if new_becomes_activation_tag:\n"," if new in tags:\n"," tags.remove(new)\n"," tags.insert(0, new)\n"," else:\n"," if new not in tags:\n"," tags.append(new)\n","\n"," for act in activation_tag_list:\n"," if act in tags:\n"," tags.remove(act)\n"," tags.insert(0, act)\n","\n"," with open(os.path.join(images_folder, txt), 'w') as f:\n"," f.write(\", \".join(tags))\n","\n","if global_activation_tag:\n"," print(f\"\\n📎 Applied new activation tag(s): {', '.join(activation_tag_list)}\")\n","if remove_tags:\n"," print(f\"\\n🚮 Removed {remove_count} tags.\")\n","if search_tags:\n"," print(f\"\\n💫 Replaced in {replace_count} files.\")\n","print(\"\\n✅ Done! Check your updated tags in the Extras below.\")\n"]},{"cell_type":"code","execution_count":null,"metadata":{"id":"HuJB7BGAyZCw","cellView":"form","colab":{"base_uri":"https://localhost:8080/","height":58},"executionInfo":{"status":"ok","timestamp":1739256609188,"user_tz":-240,"elapsed":19,"user":{"displayName":"Ольга","userId":"01931168844080915348"}},"outputId":"60dd9b50-d526-4e32-e1ac-02db4481d457"},"outputs":[{"output_type":"display_data","data":{"text/plain":["<IPython.core.display.Markdown object>"],"text/markdown":"### 🦀 [Click here to open the Lora trainer](https://colab.research.google.com/github/hollowstrawberry/kohya-colab/blob/main/Lora_Trainer.ipynb)"},"metadata":{}}],"source":["#@markdown ### 6️⃣ Ready\n","#@markdown You should be ready to [train your Lora](https://colab.research.google.com/github/hollowstrawberry/kohya-colab/blob/main/Lora_Trainer.ipynb)!\n","\n","from IPython.display import Markdown, display\n","display(Markdown(f\"### 🦀 [Click here to open the Lora trainer](https://colab.research.google.com/github/hollowstrawberry/kohya-colab/blob/main/Lora_Trainer.ipynb)\"))\n"]},{"cell_type":"markdown","metadata":{"id":"gDB9GXRONfiU"},"source":["## *️⃣ Extras"]},{"cell_type":"code","execution_count":5,"metadata":{"cellView":"form","id":"xEsqOglcc6hA","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1743520112658,"user_tz":-240,"elapsed":89,"user":{"displayName":"Сергей Григорьев (Sergey004)","userId":"04354315389975155845"}},"outputId":"60f838ea-f02f-4a74-8fa1-6590f3783165"},"outputs":[{"output_type":"stream","name":"stdout","text":["📊 Top 50 tags:\n","poyo (35)\n","animal ears (35)\n","furry male (35)\n","short hair (34)\n","1boy (34)\n","furry (34)\n","yellow eyes (33)\n","white hair (33)\n","blush (26)\n","mouse ears (26)\n","long sleeves (22)\n","sweater (22)\n","body fur (21)\n","tail (20)\n","white fur (20)\n","closed mouth (18)\n","black sweater (16)\n","upper body (16)\n","standing (14)\n","thick eyebrows (13)\n","grey background (13)\n","pants (12)\n","outdoors (11)\n","black pants (10)\n","mouse tail (10)\n","cowboy shot (9)\n","smile (9)\n","male child (7)\n","holding (7)\n","open mouth (7)\n","shirt (7)\n","animal hands (7)\n",":< (7)\n","indoors (6)\n","potted plant (6)\n","full body (6)\n",":3 (6)\n","plant (5)\n","portrait (5)\n","chibi (5)\n","day (5)\n","tree (5)\n","white sweater (5)\n","blurry (5)\n","whiskers (5)\n","english text (4)\n","jacket (4)\n","scarf (4)\n","coat (4)\n","pov (4)\n"]}],"source":["if \"step1_installed_flag\" not in globals():\n"," raise Exception(\"Please run step 1 first!\")\n","\n","#@markdown ### 📈 Analyze Tags\n","#@markdown Perhaps you need another look at your dataset.\n","show_top_tags = 50 #@param {type:\"number\"}\n","\n","from collections import Counter\n","top_tags = Counter()\n","\n","for txt in [f for f in os.listdir(images_folder) if f.lower().endswith(\".txt\")]:\n"," with open(os.path.join(images_folder, txt), 'r') as f:\n"," top_tags.update([s.strip() for s in f.read().split(\",\")])\n","\n","top_tags = Counter(top_tags)\n","print(f\"📊 Top {show_top_tags} tags:\")\n","for k, v in top_tags.most_common(show_top_tags):\n"," print(f\"{k} ({v})\")"]},{"cell_type":"code","execution_count":null,"metadata":{"cellView":"form","id":"x56xQYwuOz2V"},"outputs":[],"source":["#@markdown ### 📂 Unzip dataset\n","#@markdown It's much slower to upload individual files to your Drive, so you may want to upload a zip if you have your dataset in your computer.\n","zip = \"/content/drive/MyDrive/Loras/example.zip\" #@param {type:\"string\"}\n","extract_to = \"/content/drive/MyDrive/Loras/example/dataset\" #@param {type:\"string\"}\n","\n","import os, zipfile\n","\n","if not os.path.exists('/content/drive'):\n"," from google.colab import drive\n"," print(\"📂 Connecting to Google Drive...\")\n"," drive.mount('/content/drive')\n","\n","os.makedirs(extract_to, exist_ok=True)\n","\n","with zipfile.ZipFile(zip, 'r') as f:\n"," f.extractall(extract_to)\n","\n","print(\"✅ Done\")\n"]},{"cell_type":"code","execution_count":6,"metadata":{"cellView":"form","id":"dLetTcLVOvAE","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1743520123930,"user_tz":-240,"elapsed":5354,"user":{"displayName":"Сергей Григорьев (Sergey004)","userId":"04354315389975155845"}},"outputId":"9a6821a8-a53f-4b0e-fb5b-f6ddb6071591"},"outputs":[{"output_type":"stream","name":"stdout","text":["📁Loras | 1 images | 0 captions | 1 other files\n","📁Loras/saucebear/dataset | 68 images | 68 captions |\n","📁Loras/saucebear_ponyxl/dataset | 65 images | 65 captions | 65 other files\n","📁Loras/saucebear_ponyxlv1.1/dataset | 68 images | 68 captions | 68 other files\n","📁Loras/bigfreddy_ponyxl/dataset | 119 images | 119 captions | 119 other files\n","📁Loras/saucebear_Illustrious/dataset | 65 images | 65 captions | 65 other files\n","📁Loras/milkytiger_Illustrious/dataset | 79 images | 84 captions | 79 other files\n","📁Loras/poyo_Illustrious/dataset | 35 images | 35 captions | 26 other files\n"]}],"source":["#@markdown ### 🔢 Count datasets\n","#@markdown Google Drive makes it impossible to count the files in a folder, so this will show you the file counts in all folders and subfolders.\n","folder = \"/content/drive/MyDrive/Loras\" #@param {type:\"string\"}\n","\n","import os\n","from google.colab import drive\n","\n","if not os.path.exists('/content/drive'):\n"," print(\"📂 Connecting to Google Drive...\\n\")\n"," drive.mount('/content/drive')\n","\n","tree = {}\n","exclude = (\"_logs\", \"/output\")\n","for i, (root, dirs, files) in enumerate(os.walk(folder, topdown=True)):\n"," dirs[:] = [d for d in dirs if all(ex not in d for ex in exclude)]\n"," images = len([f for f in files if f.lower().endswith((\".png\", \".jpg\", \".jpeg\"))])\n"," captions = len([f for f in files if f.lower().endswith(\".txt\")])\n"," others = len(files) - images - captions\n"," path = root[folder.rfind(\"/\")+1:]\n"," tree[path] = None if not images else f\"{images:>4} images | {captions:>4} captions |\"\n"," if tree[path] and others:\n"," tree[path] += f\" {others:>4} other files\"\n","\n","pad = max(len(k) for k in tree)\n","print(\"\\n\".join(f\"📁{k.ljust(pad)} | {v}\" for k, v in tree.items() if v))\n"]},{"cell_type":"code","execution_count":4,"metadata":{"id":"IQgKAaw2H6K6","cellView":"form","executionInfo":{"status":"ok","timestamp":1743520102098,"user_tz":-240,"elapsed":170,"user":{"displayName":"Сергей Григорьев (Sergey004)","userId":"04354315389975155845"}}},"outputs":[],"source":["if \"step1_installed_flag\" not in globals():\n"," raise Exception(\"Please run step 1 first!\")\n","\n","from PIL import Image\n","import os\n","Image.MAX_IMAGE_PIXELS = None\n","\n","#@markdown ### 🖼️ Reduce dataset filesize\n","#@markdown This will convert all images in the project folder to jpeg, reducing filesize without affecting quality too much. This can also solve some errors.\n","location = images_folder\n","\n","for dir in [d[0] for d in os.walk(location)]:\n"," os.chdir(dir)\n"," converted = False\n"," for file_name in list(os.listdir(\".\")):\n"," try:\n"," # Convert png to jpeg\n"," if file_name.endswith(\".png\"):\n"," if not converted:\n"," print(f\"Converting {dir}\")\n"," converted = True\n"," im = Image.open(file_name)\n"," im = im.convert(\"RGB\")\n"," new_file_name = os.path.splitext(file_name)[0] + \".jpeg\"\n"," im.save(new_file_name, quality=95)\n"," os.remove(file_name)\n"," file_name = new_file_name\n"," # Resize large jpegs\n"," if file_name.endswith((\".jpeg\", \".jpg\")) and os.path.getsize(file_name) > 2000000:\n"," if not converted:\n"," print(f\"Converting {dir}\")\n"," converted = True\n"," im = Image.open(file_name)\n"," im = im.resize((int(im.width/2), int(im.height/2)))\n"," im.save(file_name, quality=95)\n"," # Rename jpg to jpeg\n"," if file_name.endswith(\".jpg\"):\n"," if not converted:\n"," print(f\"Converting {dir}\")\n"," new_file_name = os.path.splitext(file_name)[0] + \".jpeg\"\n"," os.rename(file_name, new_file_name)\n"," except Exception as e:\n"," print(f\"An error occurred while processing {file_name}: {e}\")\n"," if converted:\n"," print(f\"Converted {dir}\")\n"]},{"cell_type":"code","execution_count":null,"metadata":{"id":"y6PKW-LIr214"},"outputs":[],"source":["if \"step1_installed_flag\" not in globals():\n"," raise Exception(\"Please run step 1 first!\")\n","\n","#@markdown ### 🚮 Clean folder\n","#@markdown Careful! Deletes all non-image files in the project folder.\n","\n","!find {images_folder} -type f ! \\( -name '*.png' -o -name '*.jpg' -o -name '*.jpeg' \\) -delete\n"]}],"metadata":{"accelerator":"GPU","colab":{"provenance":[{"file_id":"1RQESjCSXkdHTG3Fv0PzyqUhcYbmCrPLX","timestamp":1742837406579},{"file_id":"https://github.com/hollowstrawberry/kohya-colab/blob/main/Dataset_Maker.ipynb","timestamp":1719213740517}],"gpuType":"T4"},"kernelspec":{"display_name":"Python 3","name":"python3"},"language_info":{"name":"python"}},"nbformat":4,"nbformat_minor":0}
|
poyo_Illustrious/Train poyo_Illustrious.ipynb
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
poyo_Illustrious/dataset/00094-1001207375.jpeg
ADDED
|
Git LFS Details
|
poyo_Illustrious/dataset/00094-1001207375.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
poyo, blush, short hair, long sleeves, 1boy, animal ears, closed mouth, standing, tail, yellow eyes, white hair, cowboy shot, pants, indoors, sweater, black pants, table, sunlight, thick eyebrows, plant, furry, wooden floor, mouse ears, potted plant, furry male, black sweater, male child, mouse tail, body fur, bedroom, white fur, picture frame, picture (object), cabinet
|
poyo_Illustrious/dataset/00094-1001207375_0896x1152_sdxl.npz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ca85f1e208fb75e8632ba78821bc6386c0799a10c9f7ffc29b4139a30e7d0f32
|
| 3 |
+
size 258872
|
poyo_Illustrious/dataset/132.jpeg
ADDED
|
Git LFS Details
|
poyo_Illustrious/dataset/132.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
poyo, blush, smile, short hair, open mouth, long sleeves, 1boy, holding, animal ears, standing, tail, yellow eyes, white hair, cowboy shot, tongue, pants, tongue out, chibi, sweater, english text, :3, happy, furry, animal hands, sign, mouse ears, furry male, black sweater, mouse tail, body fur, grey pants, white fur, holding paper, holding sign
|
poyo_Illustrious/dataset/132_1024x0512_sdxl.npz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:52502d38bbc936107fafde877294c00525975095a2f99fdb54bd4051f21d7bcd
|
| 3 |
+
size 248632
|
poyo_Illustrious/dataset/14225.jpeg
ADDED
|
Git LFS Details
|
poyo_Illustrious/dataset/14225.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
poyo, blush, smile, short hair, open mouth, long sleeves, 1boy, animal ears, tail, yellow eyes, upper body, white hair, indoors, hood, speech bubble, english text, hoodie, hood down, furry, notice lines, furry male, male child, balloon, blue hoodie
|
poyo_Illustrious/dataset/14225_1024x0512_sdxl.npz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:05517535e33b7100114dd9bd14abe9d400aa16cc90125489ba40c9ebb6562dc0
|
| 3 |
+
size 248632
|
poyo_Illustrious/dataset/385ca87a-a619-498c-bcb7-241333082a02.jpeg
ADDED
|
Git LFS Details
|
poyo_Illustrious/dataset/385ca87a-a619-498c-bcb7-241333082a02.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
poyo, blush, short hair, long sleeves, 1boy, animal ears, closed mouth, standing, tail, yellow eyes, white hair, cowboy shot, pants, indoors, sweater, black pants, table, sunlight, thick eyebrows, plant, furry, wooden floor, mouse ears, potted plant, furry male, black sweater, male child, mouse tail, body fur, bedroom, white fur, picture frame, picture (object), cabinet
|
poyo_Illustrious/dataset/385ca87a-a619-498c-bcb7-241333082a02_0896x1152_sdxl.npz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1ef53a5211a4bcbbf0f46f669fb0e91cd012c220a600a1914beaa59df0704d8f
|
| 3 |
+
size 258872
|
poyo_Illustrious/dataset/4f84ca45-7e8e-4161-81d6-04245de3e52c.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
poyo, blush, short hair, long sleeves, 1boy, animal ears, closed mouth, standing, tail, yellow eyes, white hair, cowboy shot, outdoors, food, day, pants, sweater, animal ear fluff, black pants, furry, potted plant, furry male, black sweater, male child, white fur
|
poyo_Illustrious/dataset/598a6e1e-e15e-4073-924e-c5039853e6d0.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
poyo, short hair, 1boy, holding, animal ears, closed mouth, standing, tail, yellow eyes, weapon, white hair, cowboy shot, outdoors, sword, cape, holding weapon, armor, v-shaped eyebrows, holding sword, thick eyebrows, shoulder armor, :<, furry, science fiction, breastplate, mouse ears, black cape, furry male, mouse tail, ruins, two-sided fabric, yellow gloves, energy sword, rubble, lightsaber
|
poyo_Illustrious/dataset/598a6e1e-e15e-4073-924e-c5039853e6d0_0896x1152_sdxl.npz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8e9469e8407811cec098bb73939c95f50a8cf9b33e25e8413e0c178973887066
|
| 3 |
+
size 258872
|
poyo_Illustrious/dataset/7780ddb5-cde8-4175-a651-02ce4c578809.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
poyo, blush, short hair, long sleeves, 1boy, animal ears, closed mouth, standing, tail, yellow eyes, ahoge, white hair, cowboy shot, outdoors, day, pants, cat ears, sweater, tree, cat tail, black pants, plant, :<, furry, potted plant, furry male, black sweater, white fur, cat boy
|
poyo_Illustrious/dataset/78a4f45c-c84f-4f78-a187-6fccf3ca0053.jpeg
ADDED
|
Git LFS Details
|
poyo_Illustrious/dataset/78a4f45c-c84f-4f78-a187-6fccf3ca0053.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
poyo, smile, short hair, long sleeves, 1boy, animal ears, jacket, yellow eyes, upper body, white hair, outdoors, scarf, blurry, sweater, coat, fur trim, :3, pov, thick eyebrows, outstretched arms, furry, snow, red scarf, snowing, mouse ears, winter clothes, white sweater, reaching towards viewer, furry male, white fur
|
poyo_Illustrious/dataset/882e896b-28d9-4abd-89b8-1bafe3803f97.jpeg
ADDED
|
Git LFS Details
|
poyo_Illustrious/dataset/882e896b-28d9-4abd-89b8-1bafe3803f97.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
poyo, smile, short hair, long sleeves, 1boy, animal ears, jacket, yellow eyes, upper body, white hair, outdoors, scarf, blurry, sweater, coat, pov, furry, snow, red gloves, red scarf, snowing, mouse ears, white coat, winter clothes, mittens, white sweater, reaching towards viewer, furry male, white fur
|
poyo_Illustrious/dataset/8ad04cd4-d067-4e80-86af-2d2010389cae.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
poyo, short hair, shirt, long sleeves, 1boy, animal ears, closed mouth, standing, tail, yellow eyes, flower, white hair, cowboy shot, outdoors, food, sky, solo focus, day, pants, cloud, sweater, tree, blue sky, black pants, thick eyebrows, grass, plant, child, furry, yellow flower, potted plant, furry male, black sweater, male child
|
poyo_Illustrious/dataset/9a05e51d-62ff-428f-aa88-c2c3b8d735b5.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
poyo, blush, short hair, long sleeves, 1boy, animal ears, closed mouth, standing, tail, yellow eyes, white hair, cowboy shot, outdoors, food, horns, sky, day, pants, sweater, tree, blue sky, fruit, black pants, thick eyebrows, grass, furry, bench, furry male, black sweater, male child, white fur, goat horns, orange (fruit), yellow gloves, banana, goat ears
|
poyo_Illustrious/dataset/A45NPY8KDBPTBR60HKN1102Z90.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
poyo, short hair, long sleeves, 1boy, animal ears, closed mouth, standing, full body, yellow eyes, white hair, barefoot, pants, grey background, sweater, black pants, furry, turtleneck sweater, mouse ears, hands in pockets, furry male, black sweater, body fur
|
poyo_Illustrious/dataset/AKNNM01TFJPFZF053TKN62PN90.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
poyo, blush, short hair, long sleeves, 1boy, holding, animal ears, closed mouth, standing, full body, yellow eyes, white hair, pants, grey background, chibi, sweater, english text, scar, black pants, half-closed eyes, furry, smoke, mouse ears, furry male, black sweater, body fur
|
poyo_Illustrious/dataset/BBFRCD1T8BZP8N1CRX3NXX07H0.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
poyo, blush, short hair, 1boy, animal ears, closed mouth, yellow eyes, upper body, white hair, grey background, sweater, :3, turtleneck, portrait, furry, colored sclera, turtleneck sweater, mouse ears, furry male, black sweater, body fur, white fur, yellow sclera
|
poyo_Illustrious/dataset/BQ97K5XCVBZSAQ3HTVPZ82EK90.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
poyo, short hair, 1boy, animal ears, chibi, english text, scar, mouse ears, furry male, mouse
|
poyo_Illustrious/dataset/CTD32FQ86VKKT69J1GW0VF3RD0.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
poyo, blush, 1boy, animal ears, closed mouth, yellow eyes, grey background, no humans, nose blush, wavy mouth, thick eyebrows, portrait, furry, furry male, body fur
|
poyo_Illustrious/dataset/K58S7Y77W3D4ATWX62HHCNF7J0.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
poyo, blush, smile, short hair, long sleeves, 1boy, animal ears, standing, tail, full body, yellow eyes, white hair, pants, grey background, collar, sweater, sleeves past wrists, :3, black pants, furry, mouse ears, leash, furry male, black sweater, mouse tail
|
poyo_Illustrious/dataset/K5SNPJ4Z4BXWYR5NYE6NWFEBP0.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
poyo, short hair, open mouth, shirt, long sleeves, 1boy, animal ears, standing, tail, full body, white hair, pants, grey background, chibi, sweater, orange eyes, black pants, claws, furry, colored sclera, animal hands, mouse ears, furry male, black sweater, body fur, animal feet, orange fur
|
poyo_Illustrious/dataset/R4Z6QWSEGHPR330ZB55ED0VM00.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
poyo, short hair, 1boy, animal ears, yellow eyes, white hair, outdoors, day, cloud, tree, military, ground vehicle, portrait, nature, :<, motor vehicle, furry, forest, aircraft, mouse ears, furry female, military vehicle, airplane, furry male, body fur, tank, white fur
|
poyo_Illustrious/dataset/RZ6QR9EEVSHGT5WXVA316XM2Y0.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
poyo, smile, short hair, long sleeves, 1boy, animal ears, jacket, yellow eyes, upper body, white hair, outdoors, scarf, blurry, sweater, coat, fur trim, :3, pov, thick eyebrows, outstretched arms, furry, snow, red scarf, snowing, mouse ears, winter clothes, white sweater, reaching towards viewer, furry male, white fur
|
poyo_Illustrious/dataset/b46bf35a-593f-4bda-8263-328117fd1a40.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
poyo, blush, smile, short hair, shirt, long sleeves, 1boy, animal ears, jacket, yellow eyes, upper body, white hair, outdoors, scarf, blurry, coat, :3, pov, furry, snow, red scarf, snowing, mouse ears, white coat, winter clothes, mittens, reaching towards viewer, furry male, body fur, white fur, animal nose
|
poyo_Illustrious/dataset/coffeee.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
poyo, blush, smile, short hair, shirt, 1boy, holding, animal ears, closed mouth, tail, full body, yellow eyes, white shirt, white hair, short sleeves, outdoors, barefoot, pants, chibi, tree, eating, thick eyebrows, grass, fire, steam, nature, furry, forest, animal hands, mouse ears, bush, furry male, male child, mouse tail, animal feet, tree stump, log, campfire, blowing
|
poyo_Illustrious/dataset/dont be sad_hug.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
poyo, blush, smile, short hair, open mouth, blonde hair, long sleeves, animal ears, closed mouth, tail, yellow eyes, upper body, white hair, multiple boys, 2boys, looking at another, sweater, turtleneck, yaoi, furry, mouse ears, hand on another's shoulder, furry male, black sweater, tiger ears, heads together, tiger boy, furry with furry
|
poyo_Illustrious/dataset/how_my_chu_how_you_feeling.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
poyo, blush, short hair, shirt, 1boy, animal ears, closed mouth, yellow eyes, upper body, white hair, indoors, hood, blurry, hoodie, blurry background, :<, furry, mouse ears, furry female, furry male, body fur, white fur, animal nose, whiskers, clothes hanger
|
poyo_Illustrious/dataset/image.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
poyo, blush, short hair, skirt, shirt, thighhighs, 1boy, animal ears, closed mouth, school uniform, standing, tail, yellow eyes, white hair, cowboy shot, choker, striped, black thighhighs, indoors, black skirt, collar, pillow, bell, bed, black choker, plant, striped thighhighs, neck bell, furry, camisole, animal hands, mouse ears, potted plant, furry male, mouse tail, bedroom, tissue box, drawer
|
poyo_Illustrious/dataset/image002.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
poyo, blush, short hair, long sleeves, 1boy, animal ears, closed mouth, tail, yellow eyes, upper body, white hair, grey background, sweater, :<, furry, colored sclera, mouse ears, white sweater, furry male, mouse tail, body fur, white fur, yellow sclera
|
poyo_Illustrious/dataset/image003.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
poyo, blush, short hair, shirt, 1boy, animal ears, closed mouth, yellow eyes, white shirt, upper body, white hair, hand up, grey background, sweater, turtleneck, suspenders, portrait, claws, furry, animal hands, turtleneck sweater, mouse ears, white sweater, furry male, body fur, white fur, grey sweater, whiskers, two-tone fur
|
poyo_Illustrious/dataset/image004.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
poyo, blush, short hair, 1boy, animal ears, bare shoulders, nipples, yellow eyes, upper body, white hair, sweater, muscular, thick eyebrows, tank top, pectorals, muscular male, bara, :<, furry, large pectorals, nipple slip, furry male, body fur, white fur, two-tone fur, sidepec, pectoral focus
|
poyo_Illustrious/dataset/image005.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
poyo, blush, short hair, 1boy, animal ears, bare shoulders, nipples, yellow eyes, upper body, white hair, muscular, tank top, pectorals, muscular male, bara, furry, large pectorals, nipple slip, furry male, body fur, white fur, black tank top, sidepec
|
poyo_Illustrious/dataset/image008.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
poyo, blush, short hair, long sleeves, 1boy, holding, animal ears, closed mouth, tail, yellow eyes, upper body, white hair, indoors, sweater, cup, hands up, holding cup, furry, drinking straw, mouse ears, drink, furry female, furry male, black sweater, body fur, disposable cup, white fur, bubble tea
|
poyo_Illustrious/dataset/image010.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
poyo, blush, short hair, open mouth, long sleeves, 1boy, animal ears, tail, yellow eyes, upper body, white hair, tears, grey background, sweater, hands up, wavy mouth, crying, claws, furry, outline, animal hands, wide-eyed, mouse ears, white outline, furry male, black sweater, body fur, tail raised, white fur
|
poyo_Illustrious/dataset/image032.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
poyo, blush, short hair, long sleeves, 1boy, holding, animal ears, tail, yellow eyes, upper body, white hair, food, hand up, grey background, sweater, black shirt, eating, border, thick eyebrows, holding food, furry, cropped torso, mouse ears, furry male, black sweater, mouse tail, body fur, white fur, burger, whiskers, cheese
|
poyo_Illustrious/dataset/pout_1.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
poyo, blush, short hair, 1boy, animal ears, hair between eyes, yellow eyes, white hair, parted lips, grey background, slit pupils, portrait, furry, furry male, body fur, animal nose, whiskers
|
poyo_Illustrious/dataset/sergey004_boxers_xx_1.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
poyo, blush, short hair, open mouth, 1boy, holding, animal ears, underwear, standing, tail, full body, yellow eyes, white hair, teeth, thick eyebrows, furry, mouse ears, holding clothes, furry male, mouse tail, male underwear, briefs, buck teeth
|
poyo_Illustrious/dataset/silly_micreo_1.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
poyo, blush, short hair, open mouth, long sleeves, 1boy, animal ears, tail, yellow eyes, upper body, white hair, tongue, fang, tongue out, sweater, microphone, claws, furry, desk, animal hands, paper, mouse ears, furry male, computer, body fur, monitor, grey sweater, whiskers, keyboard (computer), mouse (computer)
|
poyo_Illustrious/dataset_config.toml
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[[datasets]]
|
| 2 |
+
|
| 3 |
+
[[datasets.subsets]]
|
| 4 |
+
num_repeats = 2
|
| 5 |
+
image_dir = "/content/drive/MyDrive/Loras/poyo_Illustrious/dataset"
|
| 6 |
+
|
| 7 |
+
[general]
|
| 8 |
+
resolution = 1024
|
| 9 |
+
shuffle_caption = true
|
| 10 |
+
keep_tokens = 1
|
| 11 |
+
flip_aug = false
|
| 12 |
+
caption_extension = ".txt"
|
| 13 |
+
enable_bucket = true
|
| 14 |
+
bucket_no_upscale = false
|
| 15 |
+
bucket_reso_steps = 64
|
| 16 |
+
min_bucket_reso = 256
|
| 17 |
+
max_bucket_reso = 4096
|
poyo_Illustrious/training_config.toml
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[network_arguments]
|
| 2 |
+
unet_lr = 0.0003
|
| 3 |
+
text_encoder_lr = 6e-5
|
| 4 |
+
network_dim = 32
|
| 5 |
+
network_alpha = 16
|
| 6 |
+
network_module = "networks.lora"
|
| 7 |
+
network_train_unet_only = false
|
| 8 |
+
|
| 9 |
+
[optimizer_arguments]
|
| 10 |
+
learning_rate = 0.0003
|
| 11 |
+
lr_scheduler = "cosine_with_restarts"
|
| 12 |
+
lr_scheduler_num_cycles = 3
|
| 13 |
+
lr_warmup_steps = 8
|
| 14 |
+
optimizer_type = "AdamW8bit"
|
| 15 |
+
optimizer_args = [ "weight_decay=0.1", "betas=[0.9,0.99]",]
|
| 16 |
+
loss_type = "l2"
|
| 17 |
+
max_grad_norm = 1.0
|
| 18 |
+
|
| 19 |
+
[training_arguments]
|
| 20 |
+
lowram = true
|
| 21 |
+
pretrained_model_name_or_path = "/content/Illustrious-XL-v0.1.safetensors"
|
| 22 |
+
vae = "/content/sdxl_vae.safetensors"
|
| 23 |
+
max_train_epochs = 10
|
| 24 |
+
train_batch_size = 4
|
| 25 |
+
seed = 42
|
| 26 |
+
max_token_length = 225
|
| 27 |
+
xformers = false
|
| 28 |
+
sdpa = true
|
| 29 |
+
min_snr_gamma = 8.0
|
| 30 |
+
no_half_vae = true
|
| 31 |
+
gradient_checkpointing = true
|
| 32 |
+
gradient_accumulation_steps = 1
|
| 33 |
+
max_data_loader_n_workers = 1
|
| 34 |
+
persistent_data_loader_workers = true
|
| 35 |
+
mixed_precision = "fp16"
|
| 36 |
+
full_fp16 = true
|
| 37 |
+
full_bf16 = false
|
| 38 |
+
cache_latents = true
|
| 39 |
+
cache_latents_to_disk = true
|
| 40 |
+
cache_text_encoder_outputs = false
|
| 41 |
+
min_timestep = 0
|
| 42 |
+
max_timestep = 1000
|
| 43 |
+
prior_loss_weight = 1.0
|
| 44 |
+
multires_noise_iterations = 6
|
| 45 |
+
multires_noise_discount = 0.3
|
| 46 |
+
|
| 47 |
+
[saving_arguments]
|
| 48 |
+
save_precision = "fp16"
|
| 49 |
+
save_model_as = "safetensors"
|
| 50 |
+
save_every_n_epochs = 1
|
| 51 |
+
save_last_n_epochs = 10
|
| 52 |
+
output_name = "poyo_Illustrious"
|
| 53 |
+
output_dir = "/content/drive/MyDrive/Loras/poyo_Illustrious/output"
|
| 54 |
+
log_prefix = "poyo_Illustrious"
|
| 55 |
+
logging_dir = "/content/drive/MyDrive/Loras/_logs"
|