description: <p>This guide explains my method for training character models.</p><p><strong><span style="color:rgb(34, 139, 230)">Using 20 images, you can create a SDXL Pony LoRA in just 15 minutes of training time.</span></strong></p><p>This guide assumes you have experience training with kohya_ss or sd-scripts. It skips over tool operation details.</p><p><br />In creating this training, I referred to the excellent guide at the following URL: <a target="_blank" rel="ugc" href="https://civitai.com/models/281404/lora-training-guide-anime-sdxl">https://civitai.com/models/281404/lora-training-guide-anime-sdxl</a><br /></p><h3 id="heading-571">【Training Environment】</h3><p>Recommended VRAM: 12GB or higher (Confirmed working on RTX 4060Ti 16GB)</p><p>*Can be trained with 10GB VRAM if using the FP8 option.</p><p></p><h3 id="heading-572">【Tools Used】</h3><p><strong>kohya_ss GUI</strong>: <a target="_blank" rel="ugc" href="https://github.com/bmaltais/kohya_ss">https://github.com/bmaltais/kohya_ss</a></p><p>I installed kohya_ss using Stability Matrix: <a target="_blank" rel="ugc" href="https://github.com/LykosAI/StabilityMatrix">https://github.com/LykosAI/StabilityMatrix</a></p><p><strong>Pony Diffusion V6 XL:</strong><a target="_blank" rel="ugc" href="https://civitai.com/models/257749?modelVersionId=290640">https://civitai.com/models/257749?modelVersionId=290640</a></p><p><br /><strong>zunko_dataset(20 image&amp;tag)</strong>:<a target="_blank" rel="ugc" href="https://files.catbox.moe/lnelg0.zip">https://files.catbox.moe/lnelg0.zip</a></p><p><strong>zunko_Exclude_tag_list.txt:</strong> <a target="_blank" rel="ugc" href="https://files.catbox.moe/2jbc93.txt">https://files.catbox.moe/2jbc93.txt</a><br /><strong>kohya_ss preset(zunko_pony_prodigy_v1.json)</strong>:<a target="_blank" rel="ugc" href="https://files.catbox.moe/t5clrs.json">https://files.catbox.moe/t5clrs.json</a></p><p></p><h3 id="heading-573">【Training Data】</h3><p>Number of images: 20-40</p><p>Using more than this may decrease reproducibility. Consistent quality is more important than quantity.</p><p>It's best if the images are from the same illustrator, TV series, etc. with a consistent art style.</p><p>For fan art, try to gather illustrations with as consistent an art style as possible.<br /></p><p>For this, I borrowed publicly released AI training data from the Japanese ZUNKO project: <a target="_blank" rel="ugc" href="https://zunko.jp/con_illust.html">https://zunko.jp/con_illust.html</a></p><p>I selected 20 illustrations of zunko in the same outfit, converted the 768x1024 PNGs to WEBP format.</p><p>*The sd-script supports WEBP files which have a much smaller file size, so I prefer using them.</p><p><img src="https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/49e11790-85ff-4463-bf54-86de9cc243d6/width=525/49e11790-85ff-4463-bf54-86de9cc243d6.jpeg" /></p><p></p><h3 id="heading-574">【Tagging】</h3><p>Using webui's wd14tagger to re-tag the images:</p><p><img src="https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/754809d4-0191-47eb-bbf6-2de991fcc997/width=525/754809d4-0191-47eb-bbf6-2de991fcc997.jpeg" /></p><p>Model: moat-tagger-v2</p><p>Weight Threshold: Default 0.35</p><ol><li><p>select「Batch from directory」</p><p>set input &amp; output directory path</p></li><li><p>Additonal tags "zunko,score_9,source_anime,znkAA"</p><p>Character Name: zunko</p><p>Trigger Word: znkAA</p><p>Quality Tags: score_9, source_anime</p></li><li><p>Excluded Tags<br />- Remove all character traits (green hair, yellow eyes, long hair...)</p><p>- Remove clothing traits except one (kept "japanese clothes")<br /><br />I've attached a list of the words I excluded, so pasting that into the excluded tags field should give the same result.</p><p>Ideally, we want to consolidate into the trigger word, but with few training steps it's hard for the model to learn "znkAA" refers to the outfit.</p><p>So instead, I have the model absorb the outfit traits into the existing concept it recognizes as clothing: "japanese clothes", adding "znkAA" as a supplement.</p><p><br />- Leave tags for character poses, compositions, and undesirable objects (bows, books, food, etc.)</p><p></p></li></ol><h3 id="heading-575">【Start Training】</h3><p>Launch khya_ss and select the "LoRA" tab. Be careful not to open a LoRA preset while the DreamBooth tab is selected.<br />I've attached a preset, so download that and "Open" it from the settings.</p><p><img src="https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/0da981d9-05ab-4750-9ea4-214e4b56edfe/width=525/0da981d9-05ab-4750-9ea4-214e4b56edfe.jpeg" /></p><p>Adjust the file and Source model paths for your environment. Also adjust the Mixed precision and Save precision setting based on your accelerator (e.g. fp16).<br /><img src="https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/192a8279-602d-490e-bab8-043c45efa224/width=525/192a8279-602d-490e-bab8-043c45efa224.jpeg" /><br />Base Settings:</p><p>Optimizer: prodigy, LR Scheduler:1</p><p>dim: 16,Network Alpha: 2</p><p>batch: 3,repetition: 1,epoch: 50<br /><br />If you get an OOM error due to low VRAM, try checking the fp8 training option.</p><p>On my setup, 50 epochs took 14 minutes. Time will vary based on your PC specs.</p><p></p><h3 id="heading-576">【Selection】</h3><p>Finally, review the results and pick your preferred epoch. 50 epochs is just a guideline - the final epoch isn't necessarily best.</p><p>The settings save every 10 epochs, but saving every 5 may be better.</p><p>If the training data and model are well suited, it may converge quickly.</p>
modelVersions.availability: Public
modelVersions.baseModel: Pony
modelVersions.downloadUrl: https://civitai.com/api/download/models/393230
modelVersions.downloaded: true
modelVersions.downloadUrl: https://civitai.com/api/download/models/393230
modelVersions.AutoV1: F6338477
modelVersions.AutoV2: 260A075F2A
modelVersions.AutoV3: 5DDC98DAD650
modelVersions.BLAKE3: 19A282571246442F2F372A6DF2C93D36AFA64D2BF91CA0D7A94D22001968DA5B
modelVersions.CRC32: EB3CC7F4
modelVersions.SHA256: 260A075F2AB51B7BFCD62C65AC4FCC2E23AC83400FD19A995BE9DFBA916668F0
modelVersions.format: SafeTensor
modelVersions.name: zunko_pony_v1.safetensors
modelVersions.pickleScanMessage: No Pickle imports
modelVersions.pickleScanResult: Success
modelVersions.scannedAt: 2024-03-15T12:45:52.621Z
modelVersions.type: Model
modelVersions.virusScanResult: Success
modelVersions.hash: ULJH?fyZTLOB0Ot-.8t8R-x]NLNGOSMyn$Rk
modelVersions.type: image
modelVersions.url: https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/071d950e-ea5e-47c5-bd8f-7e4edb661c76/width=450/7988372.jpeg
modelVersions.name: v1.0-pony
modelVersions.publishedAt: 2024-03-15T12:59:56.937Z
name: SDXL Pony Fast Training Guide
tags: anime character girls