Train FLUX on Your Own Photos With Just 8GB VRAM: Kohya GUI LoRA Tutorial (2024, Windows)
FLUX 2 Pro compared with a trained FLUX SRPO model, plus the new Kohya trainer V35 that trains FLUX on GPUs with as little as 6 GB VRAM.
Published Aug 29, 2024 · 111,108 views · Watch on YouTube
Get the app and files

FLUX 2 vs FLUX SRPO & New Kohya SS GUI Premium FLUX Training App
FLUX 2 Pro compared with a trained FLUX SRPO model, plus the new Kohya trainer V35 that trains FLUX on GPUs with as little as 6 GB VRAM.

Kohya GUI: Convert FLUX, SD 3.5 & SDXL LoRAs to FP8 to Save Space
Converting a trained LoRA to FP8 with Kohya GUI shrinks a 2.5 GB FP32 file to 634 MB with almost the best quality, as the FP8 vs FP16 vs FP32 grid shows.

FLUX Fine-Tuning vs LoRA: Example Dataset, Trained Models & Configs
FLUX fine-tuning / DreamBooth vs LoRA experiment shared in full: a 28-image dataset, Kohya configs, grids and every trained checkpoint free on Hugging Face.

FLUX LoRA vs Fine Tuning / DreamBooth Comparison: Batch Size 1 vs 7
FLUX LoRA and Fine Tuning / DreamBooth compared with 15 and 256 training images at batch size 1 and 7, for both realism and stylization.

Kohya GUI: Full FLUX Dev DreamBooth on 6 GB GPUs Without Quality Loss
Kohya GUI can now fully fine-tune FLUX Dev on 6 GB GPUs with the same quality as 48 GB GPUs, and fine-tuning gives better results than any LoRA training.

FLUX LoRA Single Block Training Research: Network Alpha & Rank Tests
FLUX LoRA single block / layer training tested in Kohya GUI: one block needed over 10 times the usual learning rate and still gave sub-par results.
Chapters
- 0:00 Full FLUX LoRA Training Tutorial
- 3:37 Guide on downloading and extracting Kohya GUI
- 4:22 System requirements: Python, FFmpeg, CUDA, C++ tools, and Git
- 5:40 Verifying installations using the command prompt
- 6:20 Kohya GUI installation process and error-checking
- 6:59 Setting the Accelerate option in Kohya GUI, with a discussion of choices
- 7:50 Use of the bat file update to upgrade libraries and scripts
- 8:42 Speed differences between Torch 2.4.0 and 2.5, particularly on Windows and Linux
- 9:54 Starting Kohya GUI via the gui.bat or automatic starter file
- 10:14 Kohya GUI interface and selecting LoRA training mode
- 10:33 LoRA vs. DreamBooth training, with pros and cons
- 11:03 Emphasis on extensive research, with over 72 training sessions
- 11:50 Ongoing research on hyperparameters and future updates
- 12:30 Selecting configurations based on GPU VRAM size
- 13:05 Different configurations and their impact on training quality
- 14:22 "Better colors" configuration for improved image coloring
- 15:58 Setting the pre-trained model path and links for downloading models
- 16:42 Significance of training images and potential errors
- 17:08 Dataset preparation, emphasizing image captioning, cropping, and resizing
- 17:54 Repeating and regularization images for balanced datasets
- 18:25 Impact of regularization images and their optional use in FLUX training
- 19:00 Instance and class prompts and their importance in training
- 19:58 Setting the destination directory for saving training data
- 20:26 Preparing training data in Kohya GUI and generated folder structure
- 21:10 Joy Caption for batch captioning images, with key features
- 21:52 Joy Caption interface for batch captioning
- 22:39 Impact of captioning on likeness, with tips for training styles
- 23:26 Adding an activation token to prompts
- 23:54 Image caption editor for manual caption editing
- 24:53 Batch edit options in the caption editor
- 25:34 Verifying captions for activation token inclusion
- 26:06 Kohya GUI and copying info to respective fields
- 27:01 "Train images image" folder path and its relevance
- 28:10 Setting different repeating numbers for multiple concepts
- 28:45 Setting the output name for generated checkpoints
- 29:03 Parameters: epochs, training dataset, and VAE path
- 29:21 Epochs and recommended numbers based on images
- 30:11 Training dataset quality, including diversity
- 31:00 Importance of image focus, sharpness, and lighting
- 31:42 Saving checkpoints at specific intervals
- 32:11 Caption file extension option (default: TXT)
- 33:20 VAE path setting and selecting the appropriate VA.saveTensor file
- 33:59 Clip large model setting and selecting the appropriate file
- 34:20 T5 XXL setting and selecting the appropriate file
- 34:51 Saving and reloading configurations in Kohya GUI
- 35:36 Ongoing research on clip large training and VRAM usage
- 36:06 Checking VRAM usage before training and tips to reduce it
- 37:39 Starting training in Kohya GUI and explanation of messages
- 38:48 Messages during training: steps, batch size, and regularization factor
- 39:59 How to set virtual RAM memory to prevent errors
- 40:34 Checkpoint saving process and their location
- 41:11 Output directory setting and changing it for specific locations
- 42:00 Checkpoint size and saving them in FP16 format for smaller files
- 43:21 Swarm UI for using trained models and its features
- 44:02 Moving LoRA files to the Swarm UI folder
- 44:41 Speed up Swarm UI on RTX 4000 series GPUs
- 45:13 Generating images using FLUX in Swarm UI
- 46:12 Generating an image without a LoRA using test prompts
- 46:55 VRAM usage with FLUX and using multiple GPUs for faster generation
- 47:54 Using LoRAs in Swarm UI and selecting a LoRA
- 48:27 Generating an image using a LoRA
- 49:01 Optional in-painting face feature in Swarm UI
- 49:46 Overfitting in FLUX training and training image quality
- 51:59 Finding the best checkpoint using the Grid Generator tool
- 52:55 Grid Generator tool for selecting LoRAs and prompts
- 53:59 Generating the grid and expected results
- 56:57 Analyzing grid results in Swarm UI
- 57:56 Finding the best LoRA checkpoint based on grid results
- 58:56 Generating images with wildcards in Swarm UI
- 60:05 Save models on Hugging Face with a link to a tutorial
- 63:20 Using regularization images for SDXL training
- 65:30 Saving checkpoints during SDXL training
- 66:15 Extracting LoRAs from SDXL models
About this video
Ultimate Kohya GUI FLUX LoRA training tutorial. This tutorial is product of non-stop 9 days research and training. I have trained over 73 FLUX LoRA models and analyzed all to prepare this tutorial video. The research still going on and hopefully the results will be significantly improved and latest configs and findings will be shared. Please watch the tutorial without skipping any part. If you are a beginner user or an expert user, this tutorial covers all for you.
🔗 Full Instructions and Links Written Post (the one used in the tutorial) ⤵️
▶️ https://www.patreon.com/posts/click-to-open-post-used-in-tutorial-110879657
0:00 Full FLUX LoRA Training Tutorial
3:37 Guide on downloading and extracting Kohya GUI
4:22 System requirements: Python, FFmpeg, CUDA, C++ tools, and Git
5:40 Verifying installations using the command prompt
6:20 Kohya GUI installation process and error-checking
6:59 Setting the Accelerate option in Kohya GUI, with a discussion of choices
7:50 Use of the bat file update to upgrade libraries and scripts
8:42 Speed differences between Torch 2.4.0 and 2.5, particularly on Windows and Linux
9:54 Starting Kohya GUI via the gui.bat or automatic starter file
10:14 Kohya GUI interface and selecting LoRA training mode
10:33 LoRA vs. DreamBooth training, with pros and cons
11:03 Emphasis on extensive research, with over 72 training sessions
11:50 Ongoing research on hyperparameters and future updates
12:30 Selecting configurations based on GPU VRAM size
13:05 Different configurations and their impact on training quality
14:22 "Better colors" configuration for improved image coloring
15:58 Setting the pre-trained model path and links for downloading models
16:42 Significance of training images and potential errors
17:08 Dataset preparation, emphasizing image captioning, cropping, and resizing
17:54 Repeating and regularization images for balanced datasets
18:25 Impact of regularization images and their optional use in FLUX training
19:00 Instance and class prompts and their importance in training
19:58 Setting the destination directory for saving training data
20:26 Preparing training data in Kohya GUI and generated folder structure
21:10 Joy Caption for batch captioning images, with key features
21:52 Joy Caption interface for batch captioning
22:39 Impact of captioning on likeness, with tips for training styles
23:26 Adding an activation token to prompts
23:54 Image caption editor for manual caption editing
24:53 Batch edit options in the caption editor
25:34 Verifying captions for activation token inclusion
26:06 Kohya GUI and copying info to respective fields
27:01 "Train images image" folder path and its relevance
28:10 Setting different repeating numbers for multiple concepts
28:45 Setting the output name for generated checkpoints
29:03 Parameters: epochs, training dataset, and VAE path
29:21 Epochs and recommended numbers based on images