Patreon
Home / Videos / Train SDXL on Your Own Face With a 12GB GPU: Kohya LoRA Mast

Train SDXL on Your Own Face With a 12GB GPU: Kohya LoRA Masterclass (2023)

SDXL DreamBooth training on SDXL 1.0 Base lets you generate photos of yourself in different cities and fancy suits, using a config found after 120 trainings.

Published Aug 10, 2023 · 34,569 views · Watch on YouTube

Get the app and files

SDXL DreamBooth Training: Photos of Yourself in Cities and Fancy Suits

SDXL DreamBooth Training: Photos of Yourself in Cities and Fancy Suits

SDXL DreamBooth training on SDXL 1.0 Base lets you generate photos of yourself in different cities and fancy suits, using a config found after 120 trainings.

SDXL DreamBooth on an Anime Model: Regularization Images Effect Test

SDXL DreamBooth on an Anime Model: Regularization Images Effect Test

SDXL DreamBooth training on the Starlight XL Animated V3 anime model, comparing results with and without ground truth regularization images in Kohya SS GUI.

Kohya SS LoRA Automatic Installer for RunPod: SD 1.5 & SDXL

Kohya SS LoRA Automatic Installer for RunPod: SD 1.5 & SDXL

Kohya SS LoRA automatic installer scripts for RunPod with SD 1.5 and SDXL model downloads; marked outdated in favor of the newer Kohya installer.

Chapters

  1. 0:00 Intro
  2. 2:15 Pre-requirements of this tutorial
  3. 3:20 1-Click installer for Automatic1111 Web UI
  4. 4:00 How to install Automatic1111 Web UI for SDXL and SD 1.5 models
  5. 4:15 How to checkout and verify your installed Python version
  6. 4:51 Which Automatic1111 Web UI command line arguments you need for SDXL
  7. 5:15 Where to find all command line arguments of Automatic1111 Web UI
  8. 5:45 Where to download SDXL model files and VAE file
  9. 6:17 Which folders you need to put model and VAE files
  10. 7:21 Detailed explanation of what is VAE (Variational Autoencoder) of Stable Diffusion
  11. 7:57 How to set your VAE and enable quick VAE selection options in Automatic1111
  12. 8:22 What does Automatic and None options mean in SD VAE selection
  13. 8:43 Why you shouldn't use embedded VAE of SD 1.0 model
  14. 9:38 Correct resolution of SDXL - how to use SDXL
  15. 9:58 How to install Kohya SS GUI script for SDXL training
  16. 12:29 What to do if your CMD is not progressing
  17. 13:19 When you need to use FP16 instead of BF16
  18. 13:55 How to install Kohya on RunPod or on a Unix system
  19. 14:35 How to start Kohya GUI after installation
  20. 15:18 What are Stable Diffusion LoRA and DreamBooth (rare token, class token, and more) training
  21. 15:45 How to select SDXL model for LoRA training in Kohya GUI
  22. 16:31 How to save and load your Kohya SS training configuration
  23. 16:41 How to use my own used configuration for this tutorial video training
  24. 17:56 How to prepare your training images for Kohya LoRA or DreamBooth SDXL training
  25. 19:17 What kind of training images you should use for training
  26. 20:57 What kind of regularization images you should use? The logic of using ground truth images
  27. 24:35 What is number of repeating in Kohya SS. Which number you need to pick
  28. 25:56 Where will be your LoRA checkpoints saved
  29. 26:31 How to verify your training images dataset properly composed
  30. 27:12 How to set your generated LoRA file names
  31. 27:46 Which training parameters you should use for SDXL LoRA training
  32. 27:56 Why select train batch size 1 and gradient accumulation steps 1
  33. 28:18 The logic of number of epochs
  34. 30:25 Detailed explanation of Kohya SS training. What each parameter and option do
  35. 31:03 Which learning rate for SDXL Kohya LoRA training
  36. 31:10 Why do I use Adafactor
  37. 32:39 The rest of training settings
  38. 33:56 Which Network Rank (Dimension) you need to select and why
  39. 34:44 How to fix if you get out of VRAM error - not enough memory
  40. 36:04 What is Network Alpha of Kohya LoRA
  41. 36:35 Don't forget Gradient Checkpointing
  42. 37:07 How to continue training with Kohya LoRA training
  43. 37:42 What does print training command do
  44. 37:59 How to calculate number of steps for each Epoch
  45. 38:12 How to calculate how many regularization images you need
  46. 38:43 When you should increase batch size when doing Stable Diffusion training?
  47. 39:27 How number of total steps (max training steps) are calculated in Kohya training
  48. 40:25 How you can generate your own regularization / classification images
  49. 41:45 How to manually edit generated Kohya training command and execute it
  50. 43:21 How to start training in Kohya
  51. 43:36 How to do training on your second GPU with Kohya SS
  52. 46:31 How much VRAM is SDXL LoRA training using with Network Rank (Dimension) 32
  53. 47:15 SDXL LoRA training speed of RTX 3060
  54. 47:25 How to fix image file is truncated error
  55. 48:05 How to reach and contact me if you get an error
  56. 48:50 VRAM usage and speed testing of different Network Rank
  57. 51:40 How to use absolute min VRAM to make it work
  58. 52:16 When is first checkpoint generated and where they are saved
  59. 53:12 How to continue training from saved state
  60. 53:55 Auto saved configuration files
  61. 55:42 How to use LoRAs with Automatic1111 Web UI
  62. 58:02 How to assign previews to your LoRA files / checkpoints
  63. 59:00 How to do x/y/z LoRA checkpoint comparison to find best LoRA model
  64. 63:10 How to understand if your LoRA model is overtrained / cooked or not
  65. 64:50 Testing our LoRAs stylization capability
  66. 67:07 How to generate studio shot quality images that you can use on LinkedIn, Twitter, Instagram and such
  67. 67:40 How to find best generated images with using an AI tool
  68. 71:42 How to utilize ChatGPT to find very good prompts
  69. 72:19 How to utilize high-res fix and LoRA inpainting to get amazing quality distant shot images
  70. 76:02 How to fix hands and face
  71. 79:52 How to use same training command I used
  72. 80:29 When you need to reduce weight / emphasis of the rare token
  73. 83:24 How to join our Discord community for help and tips

About this video

In this tutorial, you will learn how to install Automatic1111 Web UI for SDXL. How to use LoRAs with Automatic1111 SD Web UI. How to install Kohya SS GUI scripts to do Stable Diffusion training. How to train LoRAs on SDXL model with least amount of VRAM using settings. All of the details, tips and tricks of Kohya trainings. How to do x/y/z plot comparison to find your best LoRA checkpoint. And many more.

Tutorial GitHub Readme File ⤵️

https://github.com/FurkanGozukara/Stable-Diffusion/blob/main/Tutorials/How-To-Do-Kohya-SDXL-LoRA-Training-With-Weak-Low-VRAM-GPUs.md

0:00 Intro

2:15 Pre-requirements of this tutorial

3:20 1-Click installer for Automatic1111 Web UI

4:00 How to install Automatic1111 Web UI for SDXL and SD 1.5 models

4:15 How to checkout and verify your installed Python version

4:51 Which Automatic1111 Web UI command line arguments you need for SDXL

5:15 Where to find all command line arguments of Automatic1111 Web UI

5:45 Where to download SDXL model files and VAE file

6:17 Which folders you need to put model and VAE files

7:21 Detailed explanation of what is VAE (Variational Autoencoder) of Stable Diffusion

7:57 How to set your VAE and enable quick VAE selection options in Automatic1111

8:22 What does Automatic and None options mean in SD VAE selection

8:43 Why you shouldn't use embedded VAE of SD 1.0 model

9:38 Correct resolution of SDXL - how to use SDXL

9:58 How to install Kohya SS GUI script for SDXL training

12:29 What to do if your CMD is not progressing

13:19 When you need to use FP16 instead of BF16

13:55 How to install Kohya on RunPod or on a Unix system

14:35 How to start Kohya GUI after installation

15:18 What are Stable Diffusion LoRA and DreamBooth (rare token, class token, and more) training

15:45 How to select SDXL model for LoRA training in Kohya GUI

16:31 How to save and load your Kohya SS training configuration

16:41 How to use my own used configuration for this tutorial video training

17:56 How to prepare your training images for Kohya LoRA or DreamBooth SDXL training

19:17 What kind of training images you should use for training

20:57 What kind of regularization images you should use? The logic of using ground truth images

24:35 What is number of repeating in Kohya SS. Which number you need to pick

25:56 Where will be your LoRA checkpoints saved

26:31 How to verify your training images dataset properly composed

27:12 How to set your generated LoRA file names

27:46 Which training parameters you should use for SDXL LoRA training

27:56 Why select train batch size 1 and gradient accumulation steps 1

28:18 The logic of number of epochs

30:25 Detailed explanation of Kohya SS training. What each parameter and option do

31:03 Which learning rate for SDXL Kohya LoRA training

31:10 Why do I use Adafactor

32:39 The rest of training settings