How to Train LoRA Models with Flux in ComfyUI: Complete Guide

Training custom LoRA models with Flux in ComfyUI opens up incredible possibilities for AI image generation. This comprehensive guide walks you through the entire process, from setup to testing your trained model.

Setting Up ComfyUI 0.36 for LoRA Training

Download ComfyUI 0.36 from the Promptus website. Choose the Windows portable version for easier setup. After downloading, extract the files to create your working directory.

Installing ComfyUI Manager

Before running ComfyUI, install the ComfyUI Manager for easier node management:

Navigate to your ComfyUI folder: Windows → ComfyUI → custom nodes
Right-click in the path bar and type "cmd" to open command prompt
Clone the manager repository using the git command provided in the documentation
After installation, you'll see a new "Manager" tab in ComfyUI

Installing Required Custom Nodes

Launch ComfyUI using the Nvidia GPU batch file. Once running, install these essential nodes through the Manager:

ComfyUI Flux Trainer - The core training nodes from Kai
RGthree ComfyUI - Additional utility nodes
KJNodes - Supporting functionality
WAS Node Suite (optional) - For text generation from images

After installing all nodes, restart ComfyUI completely by closing the window and relaunching the batch file.

Preparing Your Dataset

Create a folder called "training" in your ComfyUI directory. Place your training images here - ideally 20-50 images at 1024x1024 resolution for best results.

For improved training performance, consider generating text descriptions for each image using the BLIP captioning workflow (optional but recommended).

Downloading Flux Model Files

You'll need these model files in the correct directories:

Flux model file → models/checkpoints/flux/
CLIP models → models/clip/
VAE file → models/vae/

Download these from the official sources or use ComfyUI Manager to install missing models automatically.

Loading the Training Workflow

Download the base training workflow JSON from the Flux trainer repository. Drag and drop this file into your ComfyUI workspace. If any nodes appear red, use Manager → Install Missing Custom Nodes.

Configuring Training Parameters

In the loaded workflow, adjust these key settings:

  • Dataset path: Point to your training images folder
  • Dataset path: Point to your training images folder
  • Output name: Choose a memorable name for your LoRA
  • Description: Add a text description of what you're training
  • Model connections: Ensure Flux models are properly linked

Leave other parameters at default values for your first training session.

Starting the Training Process

Click "Run" to begin training. The process will show:

Current step progress
Estimated time remaining
Training loss over time
Preview images at different steps

Training time varies based on your dataset size and hardware. Expect 3-5 hours for 36 images at 1024x1024 resolution on high-end hardware.

Monitoring Training Progress

Watch the training loss graph - it should decrease over time. Stable, declining loss indicates successful training. The workflow provides real-time feedback on training performance.

Testing Your Trained LoRA

After training completes, test your LoRA:

Load a basic Flux generation workflow
Connect your trained LoRA file
Use simple prompts related to your training subject
Compare results with and without LoRA enabled

The trained model should generate images matching your dataset's characteristics.

Optimizing Training Results

For better results:

  1. Use consistent image resolution across your dataset
  2. Include 30-50 varied but related images
  3. Generate text captions for each training image
  4. Avoid over-training by monitoring loss curver

Common Training Issues

Path Errors: Use absolute file paths if relative paths fail
Memory Issues: Reduce batch size or image resolution
Missing Models: Reinstall required Flux components through Manager

Best Practices for LoRA Training

Keep training sessions focused on specific subjects or styles. Use diverse but related images in your dataset. Monitor system resources during training to prevent crashes.

Training custom LoRA models with Flux in ComfyUI requires patience and proper setup, but the results can be remarkably effective for specialized image generation tasks.

Level up your team's AI usage—collaborate with Promptus. Be a creator at https://www.promptus.ai

Join our creator newsletter

Stay up-to-date with the creator tips, workflows, models announcements and news.

Thank you! Your submission has been received!
Oops! Something went wrong
ai image generatorai video generator